We are given any arbitrary ellipse with focii $F1$ and $F2$ , $T$ is the unit tangent to the ellipse through a point $P$. Let $f$ be the sum of the distances of the of $F1$ and $F2$ from $P$ , we need to show that $T.\nabla f=0$ , also using this we need to show the angles $a$ and $b$ are equal.
What I tried :
We know that the sum of distances from $P$ to two fixed points (focii) is a constant , so we can let $f=k$ , where $k$ is any constant.
Now , $\nabla f = f_x i + f_y j$ , => $\nabla f = 0$ ,
Now we write the equation of an ellipse as follows :
$R(\theta) = acos\theta i + asin\theta j$ ( I guess we can write the equation like this).
So tangent is given by : $R^{'}(\theta) = -asin\theta i + bcos\theta j$ ,
So a unit vector $T$ would be : $ \dfrac{-asin\theta i + acos\theta j}{\sqrt{a^{2}sin^{2}\theta + b^{2}cos^{2}\theta}}$
Clearly , $T.\nabla f=0$ , Is this OK ?
And I have no idea how to use this to prove $a=b$ , could anyone help ?

We may assume that the two foci lie at $(-c,0)$ and $(c,0)$ and the length of the major semi-axis is $a$ as usual. Then a point $P=(x,y)$ on the ellipse fulfills:
$$ \sqrt{(x+c)^2+y^2}+\sqrt{(x-c)^2+y^2} = 2a \tag{1}$$ and by implicit differentiation we get: $$ \frac{(x+c)dx+y\,dy}{\sqrt{(x+c)^2+y^2}}+\frac{(x-c)dx+y\,dy}{\sqrt{(x-c)^2+y^2}}=0.\tag{2}$$ On the other hand, what is the intersection $Q$ of the $F_1 F_2$-line with the angle bisector of $\widehat{F_1 P F_2}$?
By the angle bisector theorem we have: $$ \frac{F_1 Q}{Q F_2} = \frac{\sqrt{(x+c)^2+y^2}}{\sqrt{(x-c)^2+y^2}} \tag{3}$$ hence $Q$ lies at $\left(c\cdot \frac{\sqrt{(x+c)^2+y^2}-\sqrt{(x-c)^2+y^2}}{\sqrt{(x+c)^2+y^2}+\sqrt{(x-c)^2+y^2}},0\right)$ and it is not difficult to compute the equation of the $PQ$-line. On the other hand, $(2)$ gives the equation of the tangent $t_P$ to the ellipse through $P$. By computing a dot product, it is straightforward to check that $t_P\perp PQ$ as wanted.