Question: Polar line of a point with respect to an ellipse

How to correct this code ? Thank you.

restart;
with(plots);
with(geometry);
_EnvHorizontalName := 'x';
_EnvVerticalName := 'y';
x0 := 10;
y0 := 9;
a := 7;
b := 5;
c := sqrt(a^2 - b^2);
ellipse(el, x^2/a^2 + y^2/b^2 - 1);
point(F1, -c, 0);
point(F2, c, 0);
point(P, x0, y0);
eq := simplify((a^2 - x0^2)*(y - y0)^2 + (b^2 - y0^2)*(x - x0)^2 + 2*x0*y0*(x - x0)*(y - y0)) = 0;
sol := solve({eq}, {y});
line(tang1, op(sol[1]));
slope(tang1);
line(tang2, op(sol[2]));
slope(tang2);
sol2 := op(solve({op(sol[1]), x^2/a^2 + y^2/b^2 - 1 = 0}, {x, y}));
xM2 = rhs(sol2[1]);
yM2 = rhs(sol2[2]);
point(M2, xM2, yM2);
sol3 := op(solve({op(sol[2]), x^2/a^2 + y^2/b^2 - 1 = 0}, {x, y}));
xM3 = rhs(sol3[1]);
yM3 = rhs(sol3[2]);
point(M3, xM3, yM3);
assume(xM2 - xM3 <> 0);
line(Pol, [M2, M3]);
coordinates(M2);
display(textplot([[-c, 0, "F1"], [c, 0, "F2"], [coordinates(P)[], "P"]], align = {"above", 'right'}), draw([el(color = red), P(color = black, symbol = solidcircle, symbolsize = 16), tang1(color = green), tang2(color = green), Pol(color = red, thickness = 3), F1(color = blue, symbol = solidcircle, symbolsize = 16), F2(color = red, symbol = solidcircle, symbolsize = 16)]), axes = none);
Warning, data could not be converted to float Matrix

Please Wait...