analytic geometry

find the equation of the circle that is tangent to the line 2x+y=1 and 2x+4y=3 and whose centeris on the line 2x-18y=-25

Center (h, k)
$2h - 18k = -25$

$k = \dfrac{2h + 25}{18}$
 

Distance from (h, k) to 2x + y = 1
$d_1 = \dfrac{2h + k - 1}{\sqrt{2^2 + 1^2}}$

$d_1 = \dfrac{2h + k - 1}{\sqrt{5}}$
 

Distance from (h, k) to 2x + 4y = 3
$d_2 = \dfrac{2h + 4k - 3}{\sqrt{2^2 + 4^2}}$

$d_2 = \dfrac{2h + 4k - 3}{2\sqrt{5}}$
 

Radius of circle r = d1 = d2
$d_1 = d_2$

$\dfrac{2h + k - 1}{\sqrt{5}} = \dfrac{2h + 4k - 3}{2\sqrt{5}}$

$2(2h + k - 1) = 2h + 4k - 3$

$2h - 2k + 1 = 0$

$2h - 2\left( \dfrac{2h + 25}{18} \right) + 1 = 0$

$18h - (2h + 25) + 9 = 0$

$h = 1$
 

$k = \dfrac{2(1) + 25}{18}$

$k = \frac{3}{2}$
 

$r = \dfrac{2(1) + \frac{3}{2} - 1}{\sqrt{5}}$

$r = \frac{1}{2}\sqrt{5}$
 

Equation of the circle
$(x - h)^2 + (y - k)^2 = r^2$

$(x - 1)^2 + (y - \frac{3}{2})^2 = (\frac{1}{2}\sqrt{5})^2$

$(x^2 - 2x + 1) + (y^2 - 3y + \frac{9}{4}) = \frac{5}{4}$

$x^2 + y^2 - 2x - 3y + 2 = 0$