Answer
$$r^2+5r-1-\frac{10}{r-5}$$
Work Step by Step
The area of a square is given by $A_s=lw$. In this problem, the area is given by $A=r^3-24r-5$, the width is defined by $w=r-5$ and it asks for the length. To find the length, you will need to divide the function for $A$ by the function for $w$. You can add placeholders in order to divide.
$$(r^3-0r^2-24r-5)\div(r-5)$$
Go through the process of long division: multiply the divisor, subtract that expression, bring the next term down, and repeat.
Your remainder should be -10, so you can add $\frac{-10}{r-5}$ to your answer