Please help, math problem with mouse interaction

Hey guys, I am trying to duplicate and effect ive seen where a larger image pans beneath a mask.

Basically I want my large image lets say 400x600 under my mask 200x200. When the users mouse is within the mask I want its position relative to the edges of the mask to bring the big clip flush with that spot and so on. So at 0:0 it should be at 0:0 but at 200:200 it should be at 400:600.

I’ve been trying different things but can’t seem to get the math right. Can someone help me out with this? I’m pulling my hair out.

Thanks