ratio relationship

Hello everyone,

One of my co workers is trying to set up a model & drawing that will automatically adjust the spacing of rafters in a hip roof. 

The goal is to enter in a length (say 'X') and width (say 'Y') for the roof and get the spacing (say 'Q' because 'Z' is too predictable). 

He has noticed that a relationship that stays consistent but can figure out how to mathematically write it out.  I feel like it's on the tip of my mind teasing me but I can't get it. 

One of the relationships is X=180, Y=70 & Q=112.5  If we add or subtract to X the same happens to Q.  Add 2" to X and it adds 2" to Q.  If we add or subtract to Y the opposite happens to Q.  Add 2" to Y and it subtracts 2" from Q.  Does anyone know what formula I would need to write to express these relationships?  If so will you please share it with me?

Joe 

SolidworksGeneral