Let us assume that the line 2x + y – 4 = 0 divides the line segment AB in the ratio k : 1.
Coordinates of the point of division can be given as follows using section formula:
x=2+3kk+1
y=−2+7kk+1
Substituting the values of x and y in following equation:
2x+y−4=0
⇒ 2(2+3kk+1)+(−2+7kk+1)−4=0
⇒ 4+6kk+1+(−2+7kk+1)−4=0
⇒ 4+6k−2+7k−4(k+1)=0
⇒ 4+6k−2+7k−4k−4=0
⇒ −2+9k=0
⇒ 9k=2
⇒ k=29