3d Camera mishap for my game

I am making a RTS game in 3D such as Homeworld.

The viewer is supposed to rotate around the ship with the camera pointing at the ship
to get any angle they want. The new feature is that they can change their angle, so it’s
not fixed to stare at the ship all the time. The camera will stay, the fixed angle to look
at the camera will still exist, but the viewer will look freely.

I’ve had nothing but problems with the coding of this. It always rotates or translates the
wrong way and I can’t quite seem to figure out the order of operations and coding it
in my head. The logic evades me.

Here’s what needs to be done, the orders of operation but not in the right order
and probably missing an order or two.

-Move the world so that the ship of our attention is at origin, 0,0,0
-Zoom out, this is our zoom distance from the ship
-Rotate, this is the angle that we’re looking at the ship if we’re under the ship, in front
etc.
-THEN rotate other than the fixed angle towards the ship. User presses observer button
to look. This is the confusing part(coding that is). The camera stays in the
same place but it’s looking angle changes.

Now I hope this makes sense, I’ve explained it as clearly as I could. I hope you know
my problem and what I hope to accomplish.

I’m pretty sure this is an easy concept too.

NOTE: please post pseudo code and document it as you see fit.