Let us assume the line divides AB in k:1 ratio.
Coordinates of point of division can be given as follows:
x=2+3kk+1y=−2+7kk+1
Substituting the values of x and y in following equation;
Hence, the ratio is 2 : 9.
2x +y -4 =0
Or, 2(2+3kk+1)+(−2+7kk+1)−4=0
Or, 4+6kk+1+(−2+7kk+1)=0
Or, 4+6k-2+7k-4(k+1)=0
Or, 4+6k -2 +7k -4k -4 =0
Or, -2 +9k =0
Or, 9k =2
Or, k=29