Let $j$ be a hyperbola. Let $P$ be a point outside the hyperbola. Tangents from $P$ to the hyperbola touch it at $X$ and $Y$. Find the locus of $P$ such that $PX=PY$.
It's a question asked by my one of the teachers who are guiding my way to my JEE preparation.
I can't imagine the figure associated with it. I was confused between these two figures but eventually I carried on with the second figure but I struggled to find the necessary conditions.
My approach
I tried with the parametric points on the hyperbola with: $X=(a\sec\theta_1, b\tan\theta_1)$ and $Y=(a\sec\theta_2, b\tan\theta_2)$ and took a point $P$ outside it as $(h, k)$. Now, I wrote two tangent equations passing through $X$ and $Y$.
But, it keeps getting more and more complex calculations and I'm failing to reduce the informations to the desired form. Please help.


I would suggest you start with a specific hyperbola, and then generalize once you understand that simpler situation. So let's pick $x^2-y^2=1$. I like your idea of picking two points in the hyperbola and going from there, but I dislike trigonometric functions. So I'll use the tangent half angle substitution – or rather it's hyperbolic counterpart – to write this as
\begin{align*} X&=\left(\frac{1+t^2}{1-t^2},\frac{2t}{1-t^2}\right)\\ Y&=\left(\frac{1+u^2}{1-u^2},\frac{2u}{1-u^2}\right) \end{align*}
I have a background in projective geometry, so I'll use that to obtain $P$ from this. You might take a different approach. I would start by representing the points as homogeneous coordinates:
\begin{align*} X&=\left[1+t^2:2t:1-t^2\right]\\ Y&=\left[1+u^2:2u:1-u^2\right] \end{align*}
You can get the homogeneous coordinates of the corresponding tangents by multiplying the points with the symmetric matrix of the conic, and construct their intersection using the cross product:
\begin{align*} P=\left(\begin{bmatrix}1&0&0\\0&-1&0\\0&0&-1\end{bmatrix} \begin{bmatrix}1+t^2\\2t\\1-t^2\end{bmatrix}\right)\times \left(\begin{bmatrix}1&0&0\\0&-1&0\\0&0&-1\end{bmatrix} \begin{bmatrix}1+u^2\\2u\\1-u^2\end{bmatrix}\right) =2(t-u)\begin{bmatrix}1+tu\\t+u\\1-tu\end{bmatrix} \end{align*}
Dehomogenizing this you learn that the point is not defined for $t=u$ (hardly surprising, but interestingly a liftable singularity) and otherwise will be at the following position, which you might have gotten from a less projective approach as well:
$$P=\left(\frac{1+tu}{1-tu},\frac{t+u}{1-tu}\right)$$
Now you can go ahead, compute the distance from there to $X$ and to $Y$ respectively, and equate that. Better yet, take the squared distance, and the results will be rational functions in $t$ and $u$. Looking for equality you find that the two lengths are equal if and only if
$$(t+u)(1+tu)(t-u)^3=0$$
If you are wondering about all the steps in between: I've been lazy, used Sage to do the computations for me and factor the numerator of the resulting rational function. I assume you could do that by hand, but the fact that the result has combined degree 10 in some of the terms makes that tedious. Maybe you can get rid of some factors early along the way.
So what does this mean geometrically? $(t+u)=0$ leads to $P_y=0$ and $(1+tu)=0$ means $P_x=0$. That's why a comment stated that the axes would be the locus. And the remaining $(t-u)=0$ means $t=u$, $X=Y$, and if you lift the singularity then the resulting point $P$ will be on the hyperbola. But that's probably not part of the locus the way you defined it.
You might want to inspect which parts of the coordinate axes your locus covers. If you set $u=-t$ you get
$$P=\left(\frac{1-t^2}{1+t^2},0\right)$$
This covers the range between $x=-1$ for $t=u=\infty$ and $x=1$ for $t=u=0$. The fact that your need to consider this infinity so you don't miss one of the points is one of the drawbacks of the half angle formulas. But since both endpoints have $t=u$ I believe they both should be excluded from the locus, and you only get the part between. For $u=-\frac1t$ you get
$$P=\left(0,\frac t2-\frac 1{2t}\right)$$
This covers the whole vertical range. There is still one special case to consider, namely $t=1,u=-1$ (or the other way round). That gives $P=(0,0)$ in both formulas. But in this situation the points on the hyperbola lie at infinity, and the tangents have turned to asymptotes. Both your distances equal infinity. I would assume that you'd want to exclude this, too.
So how does this generalize? To understand that, first figure out how special we are. A conic is defined by 5 real degrees of freedom. 2 of them can be accounted for by the location of the center. 1 could correspond to rotation. 1 might be seen as overall scale. All of these don't impact the configuration of tangents and the equality of lengths, so our specific choice was without loss of generality for these parameters. So we only have 1 real degree of freedom left to account for. It might be seen as the aspect ratio. If you keep your $x$ coordinates but scale all $y$ coordinates by a common factor, the shape of the hyperbola would change. But the locus is in a particularly symmetric position, where such a scaling of one coordinate axis would affect both points $X$ and $Y$ in the same way, so the locus would still remain at the axes.
Granted, this argument by counting degrees of freedom requires some experience and is still fairly hand-wavey. So if you want to be more thorough, you could either transform the generic situation to your special case and back again, or you could include the lengths of the half axes in your formulas and do all the computations with them pulled along.