In general, the formula to find the midpoint of a line segment which ends have the coordinates (x₁,y₁) and (x₂,y₂) is given by
Working with the formula we are given, for the x coordinate of the midpoint we have:
In order for this to be like the previous formula, we have the following equation:
From here, we see that a+b must be equal to 2, so:
In order for this last equation to be true, a must equal 1:
Let's verify this with the formula for the y coordinate of the midpoint:
Since using our previous deduction leads us to the correct formula for the y coordinate of the midpoint as well, we can conclude that a=1 and a+b=2.