Using the section formula, if a point (x,y) divides the line joining the points (x1,y1) and (x2,y2) in the ratio m:n, then (x,y) = (mx2 + nx1 / m+n, my2 + ny1 / m+n)
Since, P and Q are points of trisection and P is nearer to A
=> AP:PB = 1:2
So, P = (mx2 + nx1 / m+n, my2 + ny1 / m+n) => (1(5) + 2(2) / 1+2, 1(-8) + 2(1) / 1+2) => P(3, -2)
P passes through 2x - y + k = 0
=> k = 8