Assuming such point $Q$ exists it must lie on the Bisector Line b of $P_1$ and $P_2$ i.e. the line through the midpoint of $P_1$ and $P_2$ and orthogonal to the line $\vec {P_1P_2}$.
Thus you can write down a parametric expression for $Q=Q(s)\in b$ and set the following equation for distances:
$$d^2(Ql)=d^2(QP_1)$$
Firstly note that, without loss of generality, we can assume that the origin coincides with the intersection point between $l$ and $b$. In fact if $b\equiv l$ solution is trivial otherwise if not we can find the intersection point and simply shift the axes (we could also rotate the axes in such way that $l$ or $b$ coincide with an axis but it should be more complex whereas shifting is trivial).
Thus, let's assume:
$P_1=(x_1,y_1), P_2=(x_2,y_2)$,
l: $ ax+by=0$,
b: $cx+dy=0$
NOTE
find c and d is trivial
Finding perpendicular bisector of the line segement joining $ (-1,4)\;\text{and}\;(3,-2)$
Parametric equation of $Q \in b$ is given by:
$Q(t)=Q(d \cdot t,-c \cdot t)$ with $t\in \mathbb{R}$
The distances are given by:
$$\text{d($Ql$)} = \frac{\left | Ax_{0} + By_{0} + C\right |}{\sqrt{A^2 + B^2} }= \frac {\left| ad\cdot t - bc\cdot t \right|}{\sqrt{a^2 + b^2}} $$
$$\text{d($QP_1$)} = \sqrt{(d\cdot t-x_1)^2 + (-c\cdot t-y_1)^2}$$
and thus
$$\frac {\left| adt - bct \right|}{\sqrt{a^2 + b^2}}=\sqrt{(d\cdot t-x_1)^2 + (-c\cdot t-y_1)^2}$$
$$\frac {\left( ad\cdot t - bc\cdot t \right)^2}{{a^2 + b^2}}=(d\cdot t-x_1)^2 + (-c\cdot t-y_1)^2$$
from which "t" and thus "Q" can be easily found.
Best Answer
The equation of a straight line is
$$y=mx+b.\qquad (1)$$
If the line passes through $P_{1}(x_{1},y_{1})$, then
$$y_{1}=mx_{1}+b\qquad (2)$$
and
$$b=y_{1}-mx_{1}.\qquad (3)$$
If it passes through $P_{2}(x_{2},y_{2})$, then
$$y_{2}=mx_{2}+b.\qquad (4)$$
The difference $(4)-(2)$ gives
$$y_{2}-y_{1}=m(x_{2}-x_{1}).\qquad (5)$$
Hence $(1)$ becomes
$$y=\frac{y_{2}-y_{1}}{x_{2}-x_{1}}x+y_{1}-\frac{y_{2}-y_{1}}{x_{2}-x_{1}}% x_{1}.\qquad (6)$$
For $P_{1}(5,10),P_{2}(50,100)$, the equation $(5)$ is
$$y=\frac{100-10}{50-5}x+10-\frac{100-10}{50-5}5,\qquad (7)$$
which is equivalent to
$$y=2x.\qquad (8)$$
For $y=23$, you have
$$23=2x.\qquad (9)$$
Thus
$$x=\frac{23}{2}.\qquad (10)$$