If you're going to apply the motion within Motion Builder, export as '.bvh for Motion Builder'. The process for retargeting in MB is easy but too involved to explain in a single forum post--I recommend visiting
3DBuzz and watching the Motion Builder basics tutorials (they're free.) These are old tutorials but the information is still correct for recent versions. You will need to dig down into the 3D Apps category for 'Motion Builder' to find the videos. This is the preferred method if you're going to be editing in Motion Builder.
If you're going to apply the motion in iPi Studio, then you want to export Mia from Motion Builder as FBX and import that file to iPi Studio after you've have your motion data tracked. Retargeting in iPi Studio is even easier--just make sure the joint names match and you're good to go. If the names don't match the iPi standards, you can remap them in iPi Studio and save the profile for next time. The information for this is in the iPi Wiki:
Animation Export and Motion Transfer When you're done, export the data in the format you need for your 3D program or game engine. FBX is very common these days.
FYI, at this stage you can even save the FBX for Motion Builder, but if you have Motion Builder and you intend to do all you're editing in it, you may as well do the retargeting in that program as described in the first paragraph as well.
Hope this helps.
G.