How does blender calculate the solve error in camera tracking?
Blender currently uses a KLT-Tracker (Kanade–Lucas–Tomasi) which is documented here.

For the calculation of the solve error the documentation of this implementation might be interesting.