Solution:
(i) Let the co-ordinates of P(x, y) divides AB in the ratio m:n.
A(3,2) and B(5,1) are the given points.
Given m:n = 1:2
x1 = 3 , y1 = 2 , x2 = 5 , y2 = 1 , m = 1 and n = 2
By Section formula x = (mx2+nx1)/(m+n)
x = (1×5+2×3)/(1+2)
x = (5+6)/3
x = 11/3
By Section formula y = (my2+ny1)/(m+n)
y = (1×1+2×2)/(1+2)
y = (1+4)/3
y = 5/3
Given P lies on the line 3x-18y+k = 0
Substitute x and y in above equation
3×(11/3)-18×(5/3)+k = 0
11-30+k = 0
-19+k = 0
k = 19
Hence the value of k is 19.
(ii) Let the co-ordinates of P(x, y) divides AB in the ratio m:n.
A(3,-5) and B(-4,8) are the given points.
Given AP/PB = k/1
m:n = k:1
x1 = 3 , y1 = -5 , x2 = -4 , y2 = 8 , m = k and n = 1
By Section formula x = (mx2+nx1)/(m+n)
x = (k×-4+1×3)/(k+1)
x = (-4k+3)/(k+1)
x = (-4k+3)/(k+1)
By Section formula y = (my2+ny1)/(m+n)
y = (k×8+1×-5)/(k+1)
y = (-4k+3)/(k+1)
Co-ordinate of P is ((-4k+3)/(k+1), (8k-5)/(k+1))
Given P lies on line x+y = 0
Substitute value of x and y in above equation
(-4k+3)/(k+1) + (8k-5)/(k+1) = 0
(-4k+3) + (8k-5) = 0
4k-2 = 0
4k = 2
k = 2/4 = ½
Hence the value of k is ½ .