We want to calculate different ways of having 8 apples and bananas. If x is the amount of bananas we have and y the amount of apples. It should happen that the sum of this two quantities is always 8. That is, we have the following equation
If we subtract x on both sides of the equation, we would get
This means that for every value of x that we give, we can find the value of y by simply subtracting the value of x from 8.
So, to find 3 different ways of having 8 apples and bananas, we simply find three different values for x, so we have three different values of y.
Let x=1. then y=8-1=7. So if we have 1 banana, we should have 7 apples.
Let x=2, then y=8-2=6. So if we have 2 bananas, we should have 6 apples.
Finally, let x=3, then y=8-3=5. So if we have 3 bananas, we should have 5 apples.