Put the equation of the line passing the point A(4,1) has the form a*(x-4)+b*(y-1)=0. We always assume a^2 + b^2 = 1. And then, you solve the system of equations

**solve([-4*a-b=2,a^2+b^2=1],[a,b]);**

**But I don't know how to get the exactly solutions **[a = -8/17-1/17*13^(1/2),b = -2/17+4/17*13^(1/2)] and [[a = -8/17+1/17*13^(1/2), b = -2/17-4/17*13^(1/2)]]

I must solve in two cases

**solve([f(0,0)=2,a^2+b^2=1,b<0],[a,b]);**

**solve([f(0,0)=2,a^2+b^2=1,b>0],[a,b]);**

Note that, when the line passing the point A(2,1), the line x = 2 has not slope, but it is also a tangent of the circle. You try

**f:=(x,y)->a*(x-2)+b*(y-1):**

**solve([f(0,0)=2,a^2+b^2=1],[a,b]);**