The data in the table is not shown here but here is the formula for the residual
residual = observed value - predicted value
To get the predicted value, you simply use the best fit equation:
y = 2.78x - 4.4
Substituting 4:
y = 2.78(4) - 4.4
y = 6.72
This value is subtracted from the observed value to get the residual.