There are several approaches but ultimately you need to produce a mask/matte that follows the shape of the people as they move and then apply that mask/matte to the whale layer. If the motion is simple then try doing it manually using the bezier mask tools under the 'Opacity' section of the ECP: Select the whale layer and then draw a mask on it. Animate the mask to follow the people (this is called rotoscoping). This is a very manual and slow process but is the easiest to understand whats going on. You can also temporarily change the opacity of the whale layer to 0% so you can more easily track the people. If you have after effects you can do this more easily using the rotoscoping tools there which will save you a lot of time.
You could also use a difference matt is the camera is in a locked off position.
mmm for the project i am doing it is not worthy to spend time on this thing. I was thinking to something quite fast hopefully. I would like to obtain that people disappear in the whale..(just like Pinocchio tale 🙂 )