I have the following problem:

I want to prove under what conditions the value of a cell (e.g. 1 or a in the graphics) is the column mean (e.g. 1.5) plus row mean (2) minus the grand mean (2.5) like shown in the graphics above. This is true for some combination of values, but not for other combinations. For example replacing 1 with 3 or 4 by 5 respectively in the first table makes this assumption false.
So I'm trying to figure out under what conditions/combinations of numbers this is true.
My first idea was to formulate the equation under the second table, but I don't know how to proceed with the proof :(
Can someone help me out here?
You can express $b,c,d$ in terms of $a$ and constant.
$\begin{array}{|c|c|} \hline a & a+x \\ \hline a+y & a+z \\ \hline \end{array}$
The equation is
$\frac{a+(a+x)}{2}+\frac{a+(a+y)}{2}-\frac{a+(a+x)+(a+y)+(a+z)}{4}=a$
If you simplify the equation, you will find a condition. If this condition is satisfied, then your conjucture is true.