Let the point P divides the line joining the points A(−1,1) and B(5,7) in the ratio is K:1.
Then, P=(K+1K×x2+1×x1,K+1K×y2+1×y1) (∵x1=−1,y1=1,x2=5,y2=7) =(K+1K×5+1×(−1),K+1K×7+1×1) =(K+15K−1,K+17K+1)
Point P will satisfy the line x+y=4
i.e., K+15K−1+K+17K+1=14 ⇒K+15K−1+7K+1=4 ⇒12K=4K+4 ⇒8K=4 ⇒K=84=21
Hence, the required ratio is K:1=1:2 (internally)