If P (9a−2,b) divides line segment joining A (3a+1,−3) and B (8a,5) in the ratio 3:1, find the values of a and b.