I should probably use the fact that $r/d = e$, where $r$ is the distance from the focus to any point $M(x,y)$ of an ellipse. $d$ the distance from $M(x,y)$ to the directrix, and $e$ is the eccentricity.
If you showed your attempt to begin with, we might be able to be a bit more helpful; alas, since you haven't shown it, you'll have to content yourself with the following sketch of a solution.
You know the distance from an arbitrary point $(x,y)$ to the focus $(3,0)$:
$$f=\sqrt{(x-3)^2+(y-0)^2}$$
and you can use the formula for point-line distance (formula 11 here) to get the distance from $(x,y)$ to the line $x+y-1=0$:
$$d=\frac{x+y-1}{\sqrt{1^2+1^2}}$$
from which you use the definition for eccentricity, $\varepsilon=\dfrac{f}{d}$, where $\varepsilon=\dfrac12$.
At once you should obtain an equation with a square root. You can try squaring both sides of the equation and then rearrange things to obtain a two-variable quadratic as usual, but you'll have to justify why the squaring is legal. You should end up with
$$7x^2-2xy+7y^2-46x+2y+71=0$$
The figure below shows a conic section (specifically an ellipse) with focus $F$ and directrix $D$. The conic is the intersection of the blue cone and the purple "cutting plane". The figure also shows the Dandelin sphere associated with $F$ and $D$. (Interestingly, the Wikipedia article mentions the focus-directrix property "can be proved" with Dandelin spheres, but doesn't give that proof!) Let's call the green "horizontal" plane containing the circle where the sphere meets the cone the Dandelin plane; call that circle the Dandelin circle.
Now, given $P$ on the conic, let $Q$ be the corresponding point on the Dandelin circle; that is, let $Q$ be the point where the segment joining $P$ to the cone apex meets the Dandelin plane. Let $R$ be the foot of the perpendicular dropped from $P$ to the Dandelin plane, and let $S$ be the foot of the perpendicular dropped from $P$ to the directrix.
(Original image credit, with description of Dandelin spheres.)
Since segments $\overline{PF}$ and $\overline{PQ}$ are both tangent to the Dandelin sphere, we must have $|\overline{PF}|=|\overline{PQ}|$. (This, by the way, is the primary magic of the Dandelin sphere.)
We can massage the focus-directrix ratio for $P$ thusly:
$$\frac{|\overline{PF}|}{|\overline{PS}|} = \frac{|\overline{PQ}|}{|\overline{PS}|}=\frac{|\overline{PR}|/(\sin\angle Q)}{|\overline{PS}|}=\frac{|\overline{PR}|}{|\overline{PS}|}\frac{1}{\sin\angle Q}=\frac{\sin \angle S}{\sin \angle Q} \tag{$\star$}$$
Clearly, $\angle S$ is constant as $P$ moves about the conic; it's the angle between the cutting plane and Dandelin plane. But $\angle Q$ is also constant: it's the ("exterior") angle that the surface (more precisely, a "generator" line) of the cone makes with the Dandelin plane. Therefore, the focus-directrix ratio is a constant.
To complete the answer to your question, all we have to do is prove that "(focal distance)-over-(major radius)" gives the same trigonometric ratio.
For now, we'll assume the conic is an ellipse (that is $\angle S$ is smaller than $\angle Q$).
Look at the figure "sideways", reducing all the elements to their intersections with the plane through the cone's axis, perpendicular to the directrix. I'll take $P$ to be the point on the conic closest to the directrix (which itself has projected into the point $S$), and $P^\prime$ the farthest point. ($Q$ and $Q^\prime$ are the corresponding points on the Dandelin plane, which has projected into a line.) Then $\overline{PP^\prime}$ is the major axis of the ellipse. The ellipse's focus, $F$, corresponds to the point where the incircle of $\triangle OPP^\prime$ meets $\overline{PP^\prime}$; the ellipse's center corresponds to $M$, the midpoint of $\overline{PP^\prime}$.
Now that we know where everything is, a couple more applications of the equal-tangent-segment property are all we need. With $a := |\overline{MP^\prime}|$ and $c := |\overline{MF}|$, we have
$$\frac{\sin\angle S}{\sin\angle Q} = \frac{|\overline{PT}|}{|\overline{PP^\prime}|} = \frac{|\overline{QT}| - |\overline{QP}|}{2a} = \frac{(a+c)-(a-c)}{2a}= \frac{2c}{2a}= \frac{c}{a} \tag{$\star\star$}$$
For the hyperbola, overlapping elements muddle the diagram a bit, but the argument is essentially the same (with a simple sign change):
$$\frac{\sin\angle S}{\sin\angle Q} = \frac{|\overline{PT}|}{|\overline{PP^\prime}|} = \frac{|\overline{QT}| + |\overline{QP}|}{2a} = \frac{(a+c)+(c-a)}{2a}= \frac{2c}{2a}= \frac{c}{a} \tag{$\star\star^\prime$}$$
There's no argument to make for the parabola, which has no "focal distance" or "major radius". However, one sees that, as the $\angle S$ nears $\angle Q$, the ratio of the lengths of these elements within an ellipse or hyperbola approaches $1$, as expected.
Thus, the "distance-to-focus-over-distance-to-directrix" ratio and the "focal-radius-over-major-radius" ratio (when defined) are the same constant that we happen to call the "eccentricity" of a conic. This discussion reveals the geometric meaning of that number. I suspect that most students these days had no idea that there is such meaning. Kudos to the teacher who assigned this problem as homework.
Best Answer
Now, to prove these definitions are equivalent, we’re going to take the first definition and make an equation out of it. We will then manipulate it a little. Then, we’ll do the same for the second definition and we’ll get the second equation into the form of the first equation. Once we’ve done that, we will prove that the eccentricities are equal for both definitions of the eccentricity.
For the first definition, let’s say the focus is $(a, b)$ and the directrix is $Ax+By+C=0$ (this is not the same $A$ and $C$ as discussed in the first definition). The distance to the focus is: $$\sqrt{(x-a)^2+(y-b)^2}$$ The distance to the line is: $$\frac{\lvert Ax+By+C \rvert}{\sqrt{A^2+B^2}}$$ However, by dividing $Ax+By+C=0$ by some factor, we can make $\sqrt{A^2+B^2}$ equal to 1, so we can get rid of the denominator.
The ratio of the distance to the point to the distance to the line is the eccentricity, which we will call $e$, so we have: $$\frac{\sqrt{(x-a)^2+(y-b)^2}}{\lvert Ax+By+C \rvert}=e$$ Now, take the first equation and multiply both sides by the denominator to get rid of the fraction: $$\sqrt{(x-a)^2+(y-b)^2}=e\lvert Ax+By+C \rvert$$ Square both sides to simplify things: $$(x-a)^2+(y-b)^2=(eAx+eBy+eC)^2$$ Note that since $\sqrt{A^2+B^2}=1$, we have that: $$e=e\sqrt{A^2+B^2}=\sqrt{(eA)^2+(eB)^2}$$ Thus, the eccentricity is the square root of the sum of the squares of the coefficients of $x$ and $y$ on the right side. This will become relevant later.
For the second definition, let’s say one focus is $(a, b)$ and the other is $(c, d)$. The sum/difference of the distances is $D$, so we have: $$\sqrt{(x-a)^2+(y-b)^2}\pm\sqrt{(x-c)^2+(y-d)^2}=D$$ Again, $+$ is for ellipses, $-$ is for hyperbola.
Also, since $F$ is the distances between the foci, we know that: $$F=\sqrt{(a-c)^2+(b-d)^2}$$ Square both sides: $$F^2=(a-c)^2+(b-d)^2$$ Divide both sides by $D^2$: $$\left(\frac F D\right)^2=\left(\frac{a-c}{D}\right)^2+\left(\frac{b-d}{D}\right)^2$$ Take the square root of both sides and substitute $e=\frac F D$: $$e=\sqrt{\left(\frac{a-c}{D}\right)^2+\left(\frac{b-d}{D}\right)^2}$$ This will come up again later on.
Now, back to where we were before this tangent. Square both sides: $$\left(x-a\right)^2+\left(y-b\right)^2+\left(x-c\right)^2+\left(y-d\right)^2\pm2\sqrt{\left(\left(x-a\right)^2+\left(y-b\right)^2\right)\left(\left(x-c\right)^2+\left(y-d\right)^2\right)}=D^2$$ Get the radicand alone on the right side: $$\left(x-a\right)^2+\left(y-b\right)^2+\left(x-c\right)^2+\left(y-d\right)^2-D^2=\mp2\sqrt{\left(\left(x-a\right)^2+\left(y-b\right)^2\right)\left(\left(x-c\right)^2+\left(y-d\right)^2\right)}$$ Square both sides: $$\left(\left(x-a\right)^2+\left(y-b\right)^2\right)^2+\left(\left(x-c\right)^2+\left(y-d\right)^2\right)^2+2\left(\left(x-a\right)^2+\left(y-b\right)^2\right)\left(\left(x-c\right)^2+\left(y-d\right)^2\right)+D^4-2D^2\left(\left(x-a\right)^2+\left(y-b\right)^2+\left(x-c\right)^2+\left(y-d\right)^2\right)=4\left(\left(x-a\right)^2+\left(y-b\right)^2\right)\left(\left(x-c\right)^2+\left(y-d\right)^2\right)$$ Note that the $\mp$ has been removed by squaring. Now, subtract both sides by the expression on the right side: $$\left(\left(x-a\right)^2+\left(y-b\right)^2\right)^2+\left(\left(x-c\right)^2+\left(y-d\right)^2\right)^2-2\left(\left(x-a\right)^2+\left(y-b\right)^2\right)\left(\left(x-c\right)^2+\left(y-d\right)^2\right)+D^4-2D^2\left(\left(x-a\right)^2+\left(y-b\right)^2+\left(x-c\right)^2+\left(y-d\right)^2\right)=0$$ Use the $a^2+b^2-2ab=(b-a)^2$ identity to simplify and rearrange the terms so it looks more like a quadratic in terms of $D^2$: $$D^4-2D^2\left(\left(x-a\right)^2+\left(y-b\right)^2+\left(x-c\right)^2+\left(y-d\right)^2\right)+\left(\left(x-c\right)^2+\left(y-d\right)^2-\left(x-a\right)^2-\left(y-b\right)^2\right)^2=0$$ Fix the $D^2$ term so that it has the $(x-c)^2+(y-d)^2-(x-a)^2-(y-b)^2$ that’s in the constant term: $$D^4-2D^2\left(\left(x-c\right)^2+\left(y-d\right)^2-\left(x-a\right)^2-\left(y-b\right)^2\right)-2D^2\left(2\left(x-a\right)^2+2\left(y-b\right)^2\right)+\left(\left(x-c\right)^2+\left(y-d\right)^2-\left(x-a\right)^2-\left(y-b\right)^2\right)^2=0$$ Add both sides by the new term that is not part of the quadratic: $$D^4-2D^2\left(\left(x-c\right)^2+\left(y-d\right)^2-\left(x-a\right)^2-\left(y-b\right)^2\right)+\left(\left(x-c\right)^2+\left(y-d\right)^2-\left(x-a\right)^2-\left(y-b\right)^2\right)^2=2D^2\left(2\left(x-a\right)^2+2\left(y-b\right)^2\right)$$ Use the $a^2-2ab+b^2=(a-b)^2$ identity to simplify the left side. Also, factor out the $2$ from the right side: $$\left(\left(x-c\right)^2+\left(y-d\right)^2-\left(x-a\right)^2-\left(y-b\right)^2-D^2\right)^2=4D^2\left(\left(x-a\right)^2+\left(y-b\right)^2\right)$$ Simplify the left side more by expanding the quadratics and subtracting like terms. Also, write $(2D)^2$ on the right side: $$\left(2\left(a-c\right)x+c^2-a^2+2\left(b-d\right)y+d^2-b^2-D^2\right)^2=\left(2D\right)^2\left(\left(x-a\right)^2+\left(y-b\right)^2\right)$$ Now, divide both sides by $(2D)^2$: $$\left(\frac{a-c}{D}x+\frac{b-d}{D}y+\frac{c^2-a^2+d^2-b^2-D^2}{2D}\right)^2=\left(x-a\right)^2+\left(y-b\right)^2$$ Switch both sides of the equation: $$\left(x-a\right)^2+\left(y-b\right)^2=\left(\frac{a-c}{D}x+\frac{b-d}{D}y+\frac{c^2-a^2+d^2-b^2-D^2}{2D}\right)^2$$ Now, we have the equation in the same form as the first equation. However, we still need to check that the definition of eccentricity from the first equation is equal to the definition of eccentricity from this equation. As we said above from the first equation, $e$ is the square root of the sum of the squares of the coefficients of $x$ and $y$ on the right side, which means that here, according to the first equation, the eccentricity is: $$e=\sqrt{\left(\frac{a-c}{D}\right)^2+\left(\frac{b-d}{D}\right)^2}$$ However, this is the exact same eccentricity we derived for the second equation, so the eccentricities are equal.
Thus, we are done and both definitions are equivalent with equivalent eccentricities for both ellipses and hyperbolas.