Calibrated camera distance between two projected points

Hey together,

for a project i need the distance between two projected points (cv2.projectpoints). One point is at specific distance from a aruco marker and the second point in a specific distance to a second aruco marker.

I have the tvec and rvec from both markers and the two points. First plan was to create a chain from point1 to marker1, from marker1 to camera, from camera to marker 2 and from marker2 to point2. With this chain i hope i can get the distance from point1 to point2. But that was the moment i got some problems with linear algebra. I dont know how to sum up these 4 vectors/matrixes.

I dont know how to create that chain with openCV tools. Here is a example of my four points and their tvec in the last column. Problem is also that the camera that tracks the markers is mobile so the markers can be in different positions.

Hope somebody can help me with that. Thanks a lot <3

T_point1_marker1 = np.array([
    [ 1.,  0.,  0., -0.1 ],
    [ 0.,  1.,  0., -0.05],
    [ 0.,  0.,  1.,  0.  ],
    [ 0.,  0.,  0.,  1.  ],
])

T_marker1_cam = np.array([
    [ 1.,  0.,  0.,  0.10809129],
    [ 0.,  1.,  0.,  0.03833054],
    [ 0.,  0.,  1., -0.35931477],
    [ 0.,  0.,  0.,  1.        ],
])

T_cam_marker2 = np.array([
    [ 1.,  0.,  0.,  0.09360527],
    [ 0.,  1.,  0., -0.01229168],
    [ 0.,  0.,  1.,  0.36470099],
    [ 0.,  0.,  0.,  1.        ],
])

T_marker2_point2 = np.array([
    [ 1.,  0.,  0.,  0.005],
    [ 0.,  1.,  0.,  0.1  ],
    [ 0.,  0.,  1.,  0.   ],
    [ 0.,  0.,  0.,  1.   ],
])
#Process finished with exit code 1

related: https://stackoverflow.com/questions/73422724/cv2-distance-with-projectpoints

Already saw this post but still don’t know to sum up the four matrices/vectors to get the distance.