This solution comes from a differential calculus book. It seems to be on the simplifying stage already since it involves algebra. I'm wondering how it goes that way. Hopefully someone can explain this to me. Thanks!

http://i761.photobucket.com/albums/xx258/ws360/math.jpg