OK, math is not my strong suit but I played around with it for a bit, and here's what I learned (and found in my notes).
Terragen is left-handed (rotation is clockwise) with +Y vertical axis.
Blender is right-handed (rotation is counterclockwise) with +Z vertical axis.
Zero orientation is +Z for Terragen, +Y for Blender.
Terragen rotation order = ZXY
Blender's default rotation = XYZ but it can be set for individual objects. So Blender's corresponding rotation order = YXZ.
So for any object position:
Blender tx = Terragen tx
Blender ty = Terragen tz
Blender tz = Terragen ty
Blender rx = Terragen rx
Blender ry = Terragen rz
Blender rz = Terragen -ry
The problem with camera positions is that the default orientation of Blender's camera is -z (straight down). This can be corrected by adding 90 to its x rotation. But this quickly causes problems when converting camera rotations from TG to Blender that are related (I think) to gimbal lock. I corrected this by setting the x rotation of Blender's camera to 90, then parenting it to another object with zero rotation. If you do that and position the parent object, the above relationships work as long as the object's rotation order in Blender is set to YXZ.
This is a hack, but I'm guessing the true solution is to convert the TG camera's rotation values to quaternion, and using those in Blender. (And vice versa.) But that's way above my pay grade.
Maybe
@digitalguru can shed some more light on this.