I wonder why this post is voted to close as off-topic when the one who posted the question has mentioned the source of the problem which contains both the answer and the question, and the intention of the poster is to improve his understanding of how the problem is solved - clearly indicating it is not a homework question and the intention of the poster is not to cheat but to understand.
I posted a comment first, asking if the OP had tried to understand the answer on his own. If he had, he would hopefully be more specific about where he got stuck. But more than 12 hours went by with no reply from him. I interpreted this lack of response as an indication that the OP had lost interest in getting an answer. So I voted to close.
"The intention of the poster is to improve his understanding of how the problem is solved"
It does not appear as such. The OP states the problem, then the answer and then asks
"How did we arrive here?"
This does not convey a desire to improve his understanding, because no imperfect or incomplete understanding is conveyed by the OP to begin with. The question "How did we arrive here?" translates "walk me through the whole thing from the beginning to the end".
It is largely unimportant whether the OP just wanted to outsource his homework or not. Let's accept that his only desire was to honestly understand. Still, in this site we can only help those who try first to help themselves, since we are not a school.
Compare with this thread.