<s>[INST] Triangle in Triangle I have the lengths of three sides of an acute triangle ABC as shown below. Assume a point P on the side AB such that, if Q is the projection of P onto BC, R is the projection of Q onto CA, P becomes the projection of R onto AB. How can I Find the length PB.

 [/INST] I start with coordinates, choosing one edge length equal to $1$ w.l.o.g.:
$$B=(0,0) \qquad A=(x,y) \qquad C=(1,0) \qquad P=\lambda A+(1-\lambda)B$$
with $y\neq 0$ and some $\lambda\in[0,1]$ we'll need to determine.
Then using some computation (which I did using projective geometry, but there are other ways as well) you get
$$
R=(x^3\lambda + xy^2\lambda - x^2\lambda - y^2\lambda + y^2,
y  (x^2\lambda + y^2\lambda - x))/(x^2 + y^2 - x)
\\
Q=(x^4\lambda + 2x^2y^2\lambda + y^4\lambda - 2x^3\lambda - 2xy^2\lambda + x^2\lambda + y^2\lambda - y^2,0)/((x - 1)(x^2 + y^2 - x))
$$
The line $QP$ is then orthogonal to $BC$ iff they have the same $x$ coordinate, i.e. if
$$x^4\lambda + 2x^2y^2\lambda + y^4\lambda - 2x^3\lambda - 2xy^2\lambda + x^2\lambda + y^2\lambda - y^2 = \lambda x(x - 1)(x^2 + y^2 - x)$$
Subtract the right hand side, cancel out a common factor of $y^2$ and you end up with
$$\lambda=\frac1{x^2 + y^2 - x + 1}$$
Now let's turn that back into triangle lengths. I had edge lengths
$$a^2 = BC^2 = 1 \qquad c^2 = AB^2 = x^2+y^2 \qquad b^2 = AC^2 = (1-x)^2+y^2$$
so I had
$$a^2+b^2+c^2 = 2x^2+2y^2-2x+2$$
and therefore
$$\lambda=\frac{2a^2}{a^2+b^2+c^2}$$
Note that this formulation of the result is invariant under rescaling: if you scale all the coordinates by the same amount, then that amount cancels out of the above expression. Which fits in nicely with the fact that the convex combination of $P$ describes the same point no matter the scale. So at this point we are justified to drop the assumption of $a=1$ and are therefore back in the general case.
But you were not asking about this factor $\lambda$ but instead about the length $PB$. For this you have to multiply by $AB=c$, so the final result is
$$PB=\frac{2a^2c}{a^2+b^2+c^2}$$
</s>