As has been mentioned before, FS2 already has code for zooming in/out and rotating around your ship (using the various views keys). And, even better, FS2 uses matix multiplication to work out it's views, which is a damn sight easier than the other way (Whose name evades me at the moment).
The easiest way, I suppose, is some kind of subroutine that will obey a set of simple text commands, you would have to start off by defining where the camera starts, rubber banding from your own ship to another ship would be a bit of a nightmare, so the engine would probs have to start with telling the camera what ship it is looking at, the cameras X/Y/Z rotation compared to the central axes on the ship, and how far from the centre of the ship the camera is, then you could possible use sexp's to script the ships behaviour, while using the new code to control the camera properly.
Either way, big can of worms