Find the locus of points $P$ within a given $\triangle ABC$ and such that the distances from $P$ to the sides of the given triangle can themselves be the sides of a certain triangle.
Join $PA,PB,PC$ and let the perpendiculars from $P$ meet $BC,CA,AB$ in $D,E,F$ respectively. Then, $$PA^2 = PE^2 + AE^2 = PF^2 + FA^2$$ $$PB^2 = PD^2 + BD^2 = PF^2 + BF^2$$ $$PC^2 = EC^2 + PE^2 = PD^2 + CD^2$$ $$\therefore PD = \sqrt{PC^2 - CD^2} = \sqrt{PB^2 - BD^2}$$ $$PE = \sqrt{PA^2 - AE^2} = \sqrt{PC^2 - CE^2}$$ $$PF = \sqrt{PB^2 - BF^2} = \sqrt{PA^2 - AF^2} $$ How do I proceed using this ?

If the triangle is equilateral, then the sum of the distances from an arbitrary point inside the triangle to the three sides is equal to the height of the triangle, which is a constant. So the three perpendiculars are the lengths of a triangle when all of them are not longer than half the height of the given triangle. The point $P$ must lie inside the midpoint triangle of the given triangle.
For a triangle in general, I used Excel to generate random points and plot all points satisfying the condition.
My conclusion is that $P$ must be a point inside the incentral triangle of the given triangle.
We first consider the limiting case when the sum of the lengths of two perpendiculars is equal to that of the third one.
Let $BE$ be the bisector of $\angle ABC$ and $CF$ the bisector of $\angle ACB$, where $E$ lies on $AC$ and $F$ lies on $AB$. Let $G$ be a point on $EF$.
Let $X_1$, $X_2$ and $X_3$ be the feet of perpendicular to $BC$ from $E$, $F$ and $G$ respectively. Let $Y_2$ and $Y_3$ be the feet of perpendicular to $AC$ from $F$ and $G$ respectively. Let $Z_1$ and $Z_3$ be the feet of perpendicular to $AB$ from $E$ and $G$ respectively.
Note that $EX_1=EZ_1$ and $FX_2=FY_2$.
We have $\displaystyle \frac{GX_3-EX_1}{FX_2-EX_1}=\frac{EG}{EF}$, $\displaystyle \frac{EZ_1-GZ_3}{EZ_1}=\frac{EG}{EF}$ and $\displaystyle \frac{GY_3}{FY_2}=\frac{EG}{EF}$.
Therefore,
$$\frac{GX_3-EX_1}{FX_2-EX_1}=\frac{EZ_1-GZ_3}{EZ_1}=\frac{GY_3}{FY_2}$$
$$\frac{GX_3-EX_1}{FX_2-EX_1}=\frac{EX_1-GZ_3}{EX_1}=\frac{GY_3}{FX_2}$$
So,
$$GX_3-EX_1=GY_3-(EX_1-GZ_3)$$
$$GX_3=GY_3+GZ_3$$
(Note: this equality holds also for external points of division of $EF$ if we consider negative lengths.)
If $P$ is a point inside $BCEF$, let $Q$ be a point on $EF$ such that $QP$ is perpendicular to $BC$. The distance from $P$ to $BC$ is less than the distance from $Q$ to $BC$. The distance from $P$ to $AC$ is greater than the distance from $Q$ to $AC$ and the distance from $P$ to $AB$ is greater than the distance from $Q$ to $AB$. We can now conclude that the distance from $P$ to $BC$ is less than the sum of the distance from $P$ to $AB$ and the distance from $P$ to $AC$.
Let $D$ be a point on $BC$ such that $AD$ bisects $\angle BAC$.
Repeating the above arguments, the perpendiculars from $P$ to the three sides of the triangle are the lengths of a triangle if and only if $P$ lies inside $\triangle DEF$.