Explanation:
what is missing is the definition that QS is the height and therefore standing at a right angle (90°) at PR.
then this can be solved.
we use Pythagoras
c² = a² + b²
c being the Hypotenuse (the side opposite of the 90° angle), a and b are the legs.
let's start with the triangle PQS.
21² = 15² + QS²
441 = 225 + QS²
QS² = 216
QS = sqrt(216) = sqrt(36×6) = 6×sqrt(6) = 14.69693846...
now for triangle QSR
(5x - 16)² = (3x - 4)² + QS²
25x² - 160x + 256 = 9x² - 24x + 16 + 216
16x² - 136x + 24 = 0
2x² - 17x + 3 = 0
the solution to a quadratic equation
ax² + bx + c = 0
is
x = (-b ± sqrt(b² - 4ac))/(2a)
in our case
x = (17 ± sqrt(17² - 4×2×3))/(2×2) =
= (17 ± sqrt(289 - 24))/4 = (17 ± sqrt(265))/4
x1 = (17 + 16.2788206...)/4 = 8.319705149...
x2 = (17 - 16.2788206...)/4 = 0.180294851...
but using x2 in side lengths 3x - 4 or 5x - 16 gives us negative side lengths. that does not make any sense for actual side lengths.
so, x1 is our solution :
x = 8.319705149...