<s>[INST] Find tangents to a circle parallel to the straight line Find tangents to a circle $x^2+y^2=5$ parallel to the straight line $2x-y+1=0$
My solution:
$$x^2+y^2=5$$
$$S=(0,0)$$
$$r=\sqrt{5}$$
$$y=2x-1$$
$$a=2$$
Searching for b
$$y=2x+b$$
Using following formula:
$$d=\frac{Ax_0+By_0+C}{\sqrt{A^2+B^2}}$$
$$-2x+y-b$$
$$\sqrt{5}=\frac{-2\cdot0+1\cdot0+b}{\sqrt{(-2)^2+1^2}}$$
$$\sqrt{5}=\frac{b}{\sqrt{5}}$$
$b= 5$ or $b= -5$
Tangents:
$$y=2x+5$$
$$y=2x-5$$
==============================
Seems like it should be right since we got $\sqrt{5}$ at the end, but could someone look into it to make sure?
 [/INST] *

*The correct distance formula between a point $P_0(x_0,y_0)$ and the straight line $Ax+Bx+C=0$ is $$d=\frac{|Ax_0+By_0+C|}{\sqrt{A^2+B^2}}.\tag{1}$$

*From $(1)$ and since the center of the given cirle ( $ x^2+y^2=5 $ ) is $(x_0,y_0)=(0,0)$, we obtain
$$d=\frac{|C|}{\sqrt{A^2+B^2}}.\tag{2}$$

*The straight line $2x−y+1=0$ (thick blue, in the figure below) is perpendicular to the straight line $(1/2)x+y=0$ (red), because two straight lines with equations
$$Ax+By+C=0\qquad\text{ and } \qquad A'x+B'y+C'=0\tag{3}$$ are perpendicular if and only if
$$AA'+BB'=0.\tag{4}$$ 
This line $(1/2)x+y=0$ defines the two tangent points to the circle,  $(2,-1)$ and $(-2,1)$, which are the two solutions of the system of simultaneous equations, one representing the given circle $x^2+y^2=5$ (thick black) and the other, the straight line $(1/2)x+y=0$: 
$$
\left\{
\begin{aligned} 
x^2+y^2 &=5 \\ 
\frac{1}{2}x+y &=0 
\end{aligned} 
\right. \tag{5}
$$

*The family of the parallel lines to the given line $2x-y+1=0$ is defined by equation
$$2x−y+K=0,\tag{6} $$
where $K$ is a parameter.

*The two tangent lines, whose equations have been found by you ( $y=2x\pm 5$ ) correspond to $K=\pm 5$.



$$\mathbf{Figure.}\text{ Circle } x^2+y^2=5, \text{given line (thick blue) } 2x−y+1=0, \text{and the two tangents at the points } (2,−1)  \text{ and }(−2,1) \text{ (thin blue).} $$ 
</s>