In the expression A(x+5)+2(−Bx+2),

the coefficient of x is 17 and the constant term is 219. What is the value of A−B?

A(x+5)+2(−Bx+2) = (A-2B)x+(5A+4)

So:
(A-2B) = 17
(5A+4) = 219

Solve the second for A, substitute into the first and solve for B, then find A-B.