Zoom and pan

Can someone explain me this Ken Burns effect.

I would like to code this but I am not sure what are the rules exactly.