first of all, do you have a mental-model for what you are trying to do? Without at least understanding that, no amount of code will help you.
What you are essentially trying to do is rotate an object around a point. in this case, the object is the camera, and the point is some item's location.
each object, including your camera, should have some way of specifying both location and direction (usually in the form of vectors).
Armed with these, some basic math:
you can make a vector from the point you want to rotate around to the camera (camera's coordinates - point you want to rotate around).
Once you have this, you can do some matrix math (or quaternions or whatever) to rotate that vector some X degrees. This will give you a resultant vector which points in the direction you want your object to be in. be scaling this to the length of the original vector, you get the exact coordinates you want to move the camera to. So...translate the camera to that point!
Ok, that's half the problem. You now know how to move the camera to the spot you want, but it is still facing the ORIGINAL direction. so how do we rotate the camera?
well, if you take the vector you made above for translation (the end-result vector) and reverse it, you now have a vector pointing in the direction you want to be looking. using the components from this vector, you can get the amount you need to rotate the Camera's x, y, z DIRECTION vectors by to rotate it. Again, do your matrix math (or quaternion or whatever) to rotate these vectors (and thus the camera) around its local origin (or, translate first to the origin and then rotate, and translate back).
on a fundamental level, the above is one way to think about it. I make no claim that it is fastest / best (in fact, i'm a bit rusty so might even be wrong?)
once you have these fundamentals in hand I think it will be a lot easier for you since the rest is mostly lining up the right function calls...