[Math] Finding the equation of a line whose segment is intercepted between axes

analytic geometrygeometry

The question is:
Find the equation of a line passing through $(-2, 5)$ and whose segment intercepted between axes in the 2nd quadrant is $7\sqrt{2}$

I have two graphs in mind but I don't know which one is correct.
The first graph is a line from point $(-2, 5)$ to the origin since the questions says "between axes". The second graph is a line from $(-2, 5)$ to the $x$ and $y$ axis. Which one is correct? I'm going to start with distance formula, right?

Best Answer

What we have is a line with positive slope, passing through the point $(-2, 5)$, with the length of the segment on this line from the point where it intersects the negative $x$-axis at $(x_0, 0)$ and the positive $y$-axis at $(0, y_0)$ equal to $7\sqrt 2$.

We know then, that $$x_0^2 + y_0^2 = (7\sqrt 2)^2 = 98\tag{1}$$

We also know that the distance from $(x_0, 0)$ to $(-2, 5)$ plus the distance from $(-2, 5)$ to the point $(0, y_0)$ is equal to $7\sqrt 2$: $$\sqrt {25 + (x_0+2)^2} + \sqrt{4+(y_0-5)^2} = 7\sqrt 2\tag{2}.$$

Solving $(1)$ and $(2)$ simultaneously gives us the real solutions $x_0 = -7$, and $y_0 = 7$. With these values, we must have that the slope of each of these "segments" comprising the entire length are equal: $$m = \frac{5-0}{-2 - x_0} = \frac{5-y_0}{-2-0}= 1$$

Now, given your point on the line $(-2, 5)$ and the slope of $m = 1$, we can construct the equation of the line: $$y - 5 = x + 2 \iff y = x+7$$