Greetings everyone. I'm trying to do the following proof my own way but it doesn't look like my final answer is matching the solution's. Is there something wrong?

The solution shows the result by picking specific numbers of and doing some tricky algebra, right? But I want to avoid the tricky algebra

so I'm trying to use long division to "pull out" or derive the integration constant.

Thank you everyone.

Solution:

My work(My latex is below but I didn't get it right)