It is related to econometrics, however using simple algebraic logic we can solve this problem. General formula with residual is

, where r is a residual. Plugging the pair into the formula, we obtain that

and r=0.5
Answer:
40+11q
Step-by-step explanation:
5x+qy when x=8, y=11
5(8)+q(11)=40+11q