You'll recognize (5-y^2) appears in two places in the problem. This is a hint to use a change of variables x=5-y^2 as part of the solution. The algebra now simplifies:
f(y)=16 + 17(5-y^2) - (5-y^2)^2
f(x(y))=-16 + 17x - x^2
You'll notice that this is immediately factorable. Then convert back to y using the definition, and you'll see that you get another familiar-looking quadratic factor in y, which is itself factorable. When you factor that, you get your answer.