It appears that you did not distribute the factor to all terms in the second function. Start with:

Use the distributive property. The correct answer is .