Reverse engineering a camera/object animation

I have an object passing in front of my camera. It’s slowly turning and stops. I want to do the opposite. My object is stable but the camera moves, ending up with the same “animation”. Any way to do this mathematically instead of eyeballing it?