If we are drawing altitude from R the PQ will be base of this triangle. So we can say Median from R will cut on Midpoint of PQ. So firstly we will find mid point of PQ Which is S given as below:
P(4,-1) , Q (-2,7)
Let Co-ordinate of S is (x,y)
So




So midpoint of PQ is S(1,3).
Now we can find equation of RS
Co-ordinate of R is (9,9) and and S is (1,3).
In general equation of line from two point

and

is

So equation of RS is






So the equation of median is 6x - 8y = -66