Find the equation of the circle touching the line $(x-2)\cos\theta+(y-2)\sin\theta=1$ for all values of $\theta$ 
Find the equation of the circle touching the line $(x-2)\cos\theta+(y-2)\sin\theta=1$ for all values of $\theta$

The answer is given on toppr website.
It says, $(x-2)\cos\theta+(y-2)\sin\theta=\cos^2\theta+\sin^2\theta$, then comparing coefficients, it says,
$x-2=\cos\theta, y-2=\sin\theta$
I am not sure about this step. Do you think this step is valid?
Another answer exists on sarthaks website.
It says equation of tangent to the circle $(x-h)^2+(y-k)^2=a^2$ at $(x_1,y_2)$ is
$(x-h)x_1+(y-k)y_1=a^2$
Is this valid? I am not sure about this.

Here's a simpler and correct (verified by GeoGebra) solution.
The circle center is $(m,n)$, then its distance to the line must be constant as $\theta$ varies. If we write the line's equation as
$$x\cos\theta+y\sin\theta-2\cos\theta-2\sin\theta-1=0,$$
apply the distance formula to have
$$d=\frac{|m\cos\theta+n\sin\theta-2\cos\theta-2\sin\theta-1|}{\sqrt{\cos^2\theta+\sin^2\theta}}.$$
The denominator is $\sqrt1=1$, and the numerator is can be written as
$$\left|\sqrt{(m-2)^2+(n-2)^2}\sin(\theta+\varphi)-1\right|.$$
For it to be constant, $\sqrt{(m-2)^2+(n-2)^2}=0$, so $m=n=2$, and so $d=1$.
Our circle is therefore $\odot((2,2),1)$, equation
$$(x-2)^2+(y-2)^2=1.$$
