More an engineering than a math question since unstated conditions related to the nature of cantilever beams and rigid supports are needed to solve the problem.
y" = k(L-x)² = kL² - 2kLx + kx²
Integrating to find the slope of the deflected beam::
y' = kL²x - kLx² + kx³/3 + C.
Assuming a rigid connection at the base, the slope of the beam, y'(0) = 0 → C = 0
y' = kL²x - kLx² + kx³/3
Integrating to find the deflection of the beam::
y = kL²x²/2 - kLx³/3 + kx⁴/12 + C
Again, assuming a rigid connection at the base, the deflection of the beam, y(0) = 0 → C = 0
The maximum deflection occurs at the free end of the beam, x = L
y(L) = kL⁴/2 - kL⁴/3 + kL⁴/12 = kL⁴(6-4+1)/12 = kL⁴/4