
Doug C. answered 01/18/23
Math Tutor with Reputation to make difficult concepts understandable
Since the slope of line AC is -5/7:
(10-q)/(p-8) = -5/7
Since angle B is a right angle, the product of the slopes of lines AB and BC must be -1.
15/(p+1) times (q+5)/ 9 = -1
That is two equations with two unknowns. At this point you have choices.
One possibility, solve each equation for q in terms of p, equate the results and solve for p. Once you have p, substitute that value into one of those equations to get q.
Try it yourself then check your work here:
desmos.com/calculator/pevufoqymf
Except the problem states p and q are integers which is contradicted by Desmos.