Answer:
I feel the question is incomplete but there's another formula (which we can only use if the points are the intercepts on the x and y axis)
x/a + y/b = 1( a= intercept on x axis ; b = intercept on y axis )
x/2 + y /5 = 1
multipy both sides by 10
5x + 2y = 10
2y = 10- 5x
divide both sides by 2
y = 5 - 5/2x
y = -5/2 + 5(the equation of the line if the two points are the intercepts on the both axis