It appears that you have made some sign errors when subtracting. Start with:

Be sure to distribute the minus sign to all terms of the second function and then combine like terms.