While this was a quite blatant error where the last two lines were not compatible with each other. If you are in doubt, you can always insert the solution into the differential equation and check that it actually solves it.