So we get the general solution, and I know this problem requires a lot of algebraic stamina, but as long you don't make careless mistakes you'll find it reasonably rewarding, because you'll see where things are coming from.