The answer in slope-intercept form would be:
y=1/3x-3
The inverse is f^-1(x) = 2/7 + x/7
So basically you just add the like terms to simplify the equation. You have 5q-p+p+1 you can cancel out the both p’s because one is negative and one is positive. That leaves you with 5q + 1 they are not like terms so you cannot simplify them so your simplified equation is 5q +1