The reasoning you gave in your question is algebraic: I see nothing wrong with it. You can't use the standard "parallel lines have equal slopes" since your lines have undefined slopes.
However, here is another approach. All lines can be put in general linear form:
$$Ax+By=E$$
You first find $A$, $B$, and $E$ (non-unique) for your starting line $x=5$. You want to find another line,
$$Cx+Dy=F$$
that is parallel to your line, which happens when
$$AD-BC=0$$
Find $C$ and $D$ that fulfill that requirement, and find $F$ so that the point $(-1,2)$ is on the line. Then you are done!
If you want still another, slightly different approach, you could use the form
$$x \cdot \cos \theta + y \cdot \sin \theta = r$$
where $\theta$ is the direction angle of a vector perpendicular to the line and $r$ is the distance of the origin from the line. Two lines are parallel if their $\theta$'s are equal or differ by a multiple of $\pi$. In your particular problem, $\theta$ is zero.