This is the question:

The gradient of the line joining (-1,3) to (p,q) is -2. The gradient of the line joining (p,q) to (5,2) is -1. Calculate the values of p and q

What I have done is created two equations:

(q-3)/(p--1)=-2

and

(2-q)/(5-p)=-1

But what do I do next?