How to create formula for mechanism

Hello,

I am trying to create a mechanism with dependency. For that formula is required. Can an one tell me how to calculate the formula for defining a mechanism.

I am attaching the image of the mechanism for the which formula need to be calculate

Thanks
Nidhin