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.
 A: 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.$$
A: I thought of another solution. Let us find the family of tangent lines of the circle
$$C: (x-m)^2+(y-n)^2=r^2.\tag1$$
Let $P=(m+r\cos\theta,n+r\sin\theta)\in C$ where $\theta\in[0,2\pi)$ is the family parameter. Then the slope of the tangent line at $P$ is $y'=\left.-\frac{x-m}{y-n}\right\rvert_P=-\cot\theta$. Hence, the tangent line at point P is
$$(x-m)\cos\theta+(y-n)\sin\theta=r.\tag2$$
Check! So, the envelope of the family $(2)$ is the circle $(1)$.
Therefore, the envelope of the family $(x-1)\cos\theta+(y-1)\sin\theta=1$ is $(x-1)^2+(y-1)^2=1$.
A: You can see that the family of lines is always at a distance $1$ from $(2,2)$.
Hence this family is tangent to $(x-2)^2+(y-2)^2=1$
