It's a little unclear what is actually the answer to the question, since the question says one thing in the question body but there's a comment that says you really were supposed to show the converse of what is written in the question.
We can prove it both ways:
A pair of straight lines that solve the equation
$ax^2+ 2hxy + by^2 + 2gx +2fy+ c = 0$ are parallel
if and only if $h^2 = ab$ and $bg^2 = af^2$.
I still think this proposition is somewhat underhanded,
because to apply it usefully you must know already that $ax^2+2hxy+by^2+2gx+2fy+c=0$ is the equation of two lines.
How do you know that it is?
If you did not know the equation is an equation of two lines,
would have to consider counterexamples such as
$a=b=h=g=1$ and $f=-1,$
which satisfies both $h^2 = ab$ and $bg^2 = af^2$
but produces the equation of a parabola, $x^2+2xy+y^2+2x-2y+1=0.$
The approach via partial derivatives seems undesirable to me. There might be a way to make it work somehow, but what you have so far is that if the two lines given by $ax^2+2hxy+by^2+2gx+2fy+c=0$ intersect, then that intersection point is the same as the intersection of $ax+hy+g=0$ and $hx+by+f=0.$
But that does not say what happens if the two lines given by
$ax^2+2hxy+by^2+2gx+2fy+c=0$ do not intersect.
Furthermore, even if we figure out that "$ax^2+2hxy+by^2+2gx+2fy+c=0$ is an equation of parallel lines" implies that $ax+hy+g=0$ and $hx+by+f=0$ are equations of coincident lines (which is true), it does not follow that if $ax+hy+g=0$ and $hx+by+f=0$ are equations of coincident lines then $ax^2+2hxy+by^2+2gx+2fy+c=0$ is an equation of parallel lines.
For a proof in the "if" direction (which I'm showing first because of how the question was written),
assume $ax^2+2hxy+by^2+2gx+2fy+c=0$ is the equation of a pair of lines, possibly coincident,
and assume $h^2 = ab$ and $bg^2 = af^2.$
Since $ax^2+2hxy+by^2+2gx+2fy+c=0$ is the equation of a pair of lines,
the left hand side of the equation can be factored in the form
$n(Ax + By + C)(A'x + B'y + D),$ where $n\neq0$ and $A$ and $B$ are not both zero
(and also $A'$ and $B'$ are not both zero).
That is,
\begin{align}
a &= nAA',\\
h &= \frac12n(AB'+A'B),\\
b &= nBB',\\
\end{align}
among other things.
But from $h^2=ab$ we have $n^2(\frac12(AB'+A'B))^2 = n^2(AB')(A'B),$
that is, the arithmetic and geometric means of $AB'$ and $A'B$ are equal,
so $AB' = A'B.$
We therefore have $A'=pA$ and $B'=pB$ for some non-zero $p$; let $k = np,$
and now we can write $ax^2+2hxy+by^2+2gx+2fy+c=0$ in the form
$k(Ax + By + C)(Ax + By + D) = 0,$ showing that
$ax^2+2hxy+by^2+2gx+2fy+c=0$ is the equation of two parallel lines. $\square$
Notice that we did not use the fact that $bg^2 = af^2.$
This fact turns out to be an implication of the assumptions that
$ax^2+2hxy+by^2+2gx+2fy+c=0$ is the equation of two lines and that $h^2 = ab.$
For a proof in the "only if" direction,
we can write the equations of any two parallel lines (possibly coincident lines) in the form
$$
k(Ax + By + C)(Ax + By + D) = 0 \tag1
$$
where $k\neq 0$ and $A$ and $B$ are not both zero.
Note that we can always force the individual equations of the two lines to have the same two leading coefficients, that is, we can always write
$Ax + By + C = 0$ and $Ax + By + D = 0$; what (can) make the lines different is the constant terms $C$ and $D.$
More importantly (though not quite so obviously), it is also true that
if $P(x,y) = 0$ is the equation of two parallel lines, it must be possible to factor $P(x,y)$ in the form $P(x,y) = k(Ax + By + C)(Ax + By + D).$
Multiplying out the left side of Equation $(1)$,
$$
kA^2x^2 + 2kABxy + kB^2y^2 + kA(C+D)x + kB(C+D)y + kCD = 0. \tag2
$$
If $ax^2+2hxy+by^2+2gx+2fy+c=0$ is the equation of two parallel lines it must be possible to factor it as in Equation $(1)$, so it must be possible to write it in the form of Equation $(2)$, that is, there are numbers $k,$ $A,$ $B,$ $C,$ $D,$ with
$k\neq 0$ and $A,B$ not both zero, such that
\begin{align}
a &= kA^2,\\
h &= kAB,\\
b &= kB^2,\\
g &= \tfrac12 kA(C+D),\\
f &= \tfrac12 kB(C+D),\\
c &= CD.
\end{align}
Plug these factorizations into the equations $h^2 = ab$ and $bg^2 = af^2,$
confirming that those equations are both true, hence they are necessary conditions for $ax^2+2hxy+by^2+2gx+2fy+c=0$ to be the equation of two parallel lines. $\square$
But why include $bg^2=af^2$ in the statement but not any of the other relations among the equation's coefficients that were not needed in the "if" direction, but that one could nevertheless prove followed in the "only if" direction?
This is another reason I feel the question is somewhat "underhanded."
For example, one can easily confirm by the substitutions given above that $af=gh$ and $bg=fh$ are necessary.
By writing
$$
4g^2 - 4ac = (kA(C+D))^2 - 4(kA^2)(kCD) = k^2A^2(C - D)^2 \geq 0,
$$
we can also show that $g^2 \geq ac$ is necessary.
I think these equations are more useful than $bg^2=af^2.$
(I make use of them below.)
The wording of the question makes $bg^2=af^2$ look more important than it actually is.
I think it is more interesting, however, not to assume that
$ax^2+2hxy+by^2+2gx+2fy+c=0$ is the equation of a pair of lines.
In that case the conditions $h^2 = ab$ and $bg^2 = af^2$ are not sufficient
to give a pair of parallel lines, recalling the counterexample
$x^2+2xy+y^2+2x-2y+1=0.$
Removing the assumption that we already know we are dealing with an equation of two lines, we could say this:
The equation $ax^2+ 2hxy + by^2 + 2gx +2fy+ c = 0$
is an equation of two parallel lines
if and only if $h^2 = ab,$ $af=gh,$ $bg=fh,$ and $g^2\geq ac.$
The "only if" direction was proved in the proof of the "only if" direction of the earlier proposition and in the notes following that proof.
So we just need to prove the "if" direction.
Suppose we are given $ax^2+2hxy+by^2+2gx+2fy+c=0$
where $h^2 = ab,$ $af=gh,$ $bg=fh,$ and $g^2\geq ac.$
If $a=0$ we have $h = 0$ and $g = 0,$
that is, the equation is $by^2 + 2fy + c=0,$ which (since we assumed it has a solution) is the equation of either one or two lines parallel to the $x$ axis.
Similarly, if $b=0$ we get either one or two lines parallel to the $y$ axis.
So let's consider the remaining case, $ab \neq 0.$
From the condition $h^2 = ab$ we know $b$ has the same sign as $a,$ so we can set $B$ such that $aB^2 = b.$
This will imply that $h^2 = a^2B^2.$
We have two choices for the sign of $B$; choose the sign so that $h = aB.$
Now $af=gh$ is the same as $af = aBg,$ which implies $f = Bg.$
(We could conclude the same thing from $bg=fh,$ so we did not need both
$af=gh$ and $bg=fh$ when $ab\neq0$;
the reason for specifying both conditions in the original statement is so that the cases where either $a=0$ or $b=0$ are both handled and are handled in a symmetric way.)
The equation $ax^2+2hxy+by^2+2gx+2fy+c=0$ now can be written
$$
a(x+By)^2 + 2g(x+By) + c = 0.
$$
This is a quadratic equation in $x+By.$ Since $g^2 \geq ac,$ the equation has a solution and can be factored into something of the form
$$k(x+By + C)(x + By + D) = 0,$$
which is the equation of two parallel lines. $\square$
An additional consequence of the previous equation is that
the parallel lines coincide if $g^2 = ac.$
There would be no solution if $g^2 < ac.$
That is, the condition $g^2\geq ac$ eliminates equations such as
$x^2+2xy+y^2+1 = 0,$ which satisfies
$h^2 = ab,$ $af=gh,$ and $bg=fh$ but is an equation of the empty set rather than parallel lines.
Also note that we could use the condition $f^2 \geq bc$
instead of $g^2 \geq ac.$
Note that the condition $\frac ah=\frac hb=\frac gf$ implies that
$h^2 = ab$ and $bg^2 = af^2,$ although it is less universally applicable
(because it requires that $h,$ $b,$ and $f$ all are non-zero).
The same equation of ratios also implies that
$h^2 = ab,$ $af=gh,$ and $bg=fh.$
It says nothing, however, about whether $g^2\geq ac.$
So it turns out that if the lines you got by taking partial derivatives
coincide, and if $ax^2+2hxy+by^2+2gx+2fy+c=0$ has any solution at all,
then $ax^2+2hxy+by^2+2gx+2fy+c=0$ is the equation of two lines,
which might actually be the same line.
But I only know this because of a proof that did not require taking partial derivatives in the first place.
Best Answer
You can transform the quadratic equation directly: just apply a 90° rotation to it. In the simple case that the lines intersect at the origin, the resulting equation is $bx^2-2hxy+ay^2=0$.
In the general case, the intersection point is $(x_0,y_0)=\left({bg-fh\over h^2-ab},{af-gh\over h^2-ab}\right)$, so just translate the above equation: $b(x-x_0)^2-2h(x-x_0)(y-y_0)+a(y-y_0)^2=0$. Expand and rearrange as desired.