I have a question relating to finding a middle number between 2 numbers as followed:

You're given 2 numbers A and B and 2 other numbers X and Y

The objective is to find number C so that A+/- x=C And

B +/- y = C (condition is B<C<A or C is always between A and B)

The rule for x and y is: x could be X or x could be a number < X

y could be Y or y could be a number < Y

x or y can be multiplied by 2, 4 however only one of them multiplied at the time

Example : A = 9, B = 13.5, X = 0.375, Y=3.1875, the result C is 10.6875

However I play with the guessing like this: with Y = 3.1875, y could be 3.1875 (1.5 + 1.5 +0.1875) so I assign y = 1.5 + 0.1875 =1.6875 then 1.6875 + 9 = 10.6875

13.5 - 3.1875 + 0.375 = 10.6875

The problem is that it took a lot of guessing and playing around with those numbers AND there could other missing result as well, 10.6875 is NOT the only result. I'm wondering if there is a FORMULA or equation or function to solve this problem, I really appreciate anyone help me with this!