The second function means that you just substitute the values inside f() on the variables on the first equation.
If x=u+1, then:
Expanding, we get:
Simplifying this by combining like terms, we get:
I have done some double-checking and this is the answer that I get. Maybe the u-3u^2-1 is a typo? If you still have questions, message me or comment on my profile.