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.
![camera display options](https://i.sstatic.net/nUjpd.jpg)
You can use this visual display to position another camera to match the 3D settings.
![camera display example](https://i.sstatic.net/sQ5b8.jpg)
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.
![enter image description here](https://i.sstatic.net/TTu7R.jpg)