sum of perpendicular distances from the sides of a triangle. I am trying to solve a problem and got stuck in the following:-

P, A’, C’ are respectively points on the sides AC, CB, and AB of ⊿ABC. PA’ and PC’ are the perpendiculars to the sides of the triangle such that S = PA’ + PC’. Inside ⊿ABC, find a point Q (its locus would be even better) such that its sum of the perpendiculars to the side AB and side BC is equal to S.
If the above is not possible, particular solution (with conditions restricted/relaxed) is also welcome. 
 A: Such a locus is a line segment: if $Q_A,Q_B,Q_C$ are the projections of a point $Q$ (inside $ABC$) on the sides $BC,AC,AB$ of the triangle, then:
$$ QQ_A\cdot BC + QQ_B\cdot AC+QQ_C\cdot AB = 2[ABC]$$
holds, no matter where $Q$ is placed inside $ABC$. So, just find another point $P'$ on the perimeter of $ABC$ such that the sum of the distances from the sides $AB,BC$ equals $S$, and connect it with $P$: this will be your wanted locus. If you take signed distances, then the locus is the whole $PP'$-line.
If you like to use coordinate geometry, just put a skew reference system with centre in $B$ and the $x$-axis and $y$-axis oriented like $BA$ and $BC$. You are just solving $x+y=S$, that is the equation of a line.

A: As suggested, I have successfully located a point Q = P’ such that its sum of distances from AB and AC is S.

(1) Let PC’ = min(PC’, PA’).
(2) Draw a circle centered at P and radius = PC’.
(3) Extend A’P to cut the circle at X. 
(4) Translate A’X sideways until it hits AB at P’ and BC at Y.
For the point P’, its sum of distances from AB and from BC 
= 0 + P’Y = PY’ = XA’ = XP + PA’ = PC’ + PA’ = S.
P and P’ are now jointed.
According to the suggestion: any point on PP’ meets the said requirement. How to prove this is true?
