I have two object, that can be connected together by HingeJoint2d, I am creating joint by code in c#:

Now when creating joint, I need to specify anchor points, anchor will be always bottom center of the blue object A
However I am unable to calculate connected anchor, my goal is to place connected anchor in exactly the same position as anchor (like on the picture, where red dot it)
Is there possibility to calculate it? Blue box can be connected anywhere (i want to use it as a crane to lift green object)
Thank you.