The math used is in blender's source code. I think it is all contained within camera.c
Depending on your 3d camera settings, if you don't need the re-creation to be exact, you can do a visual duplication in blender. By enabling the visual display of the 3d camera (in the properties region N) you can see where they are positioned and where they are aimed.
You can use this visual display to position another camera to match the 3D settings.
By taking the settings to the extreme you can clearly see that there can be a distortion, this can be matched by adjusting the x-shift of the camera settings. You may want to check if this value is supported by the external render engine.