In particular, my question is about abstract mathematics such as group theory, analysis, topology, etc. where most textbooks are filled with exercises which require proof, and how to go about effectively "internalizing" proofs and solutions to exercises/theorems when you read them.
Often I will have the experience of trying out an exercise for a while--maybe a few hours, or days--but eventually giving up and ultimately consulting the textbook or Math.SE, etc. for a solution. However, more often than not while I do get the "aha" feeling of seeing the method or "trick" needed to prove the statement, I don't really feel as if I gained something I could apply to a brand new problem.
Recent example: Prove that $\sqrt 2 + \sqrt 3 + \sqrt 5$ is irrational.
I tried to solve this for a couple of hours, but I didn't make much progress. The solution in the book looks like this:
\begin{align*} \sqrt 2 + \sqrt 3 + \sqrt 5 &= r \in \mathbb Q\\ \\ \sqrt 2 + \sqrt 3 &= r - \sqrt 5\\ \\ (\sqrt 2 + \sqrt 3)^2 &= (r - \sqrt 5)^2\\ \\ 5+2\sqrt 6 &= r^2 + 5 -2r\sqrt 5\\ \\ 2\sqrt 6 + 2r\sqrt 5 &= r^2,\\ \end{align*}
so $2\sqrt 6 + 2r\sqrt 5$ is rational. Squaring this expression again will show that $\sqrt {30}$ is rational, which can be easily disproved.
But my question is, how does one read a solution to a problem in such a way where you can begin to comprehend what the thought processes were behind creating the solution? In the above example, it all makes sense, but why did they move $\sqrt 5$ to the RHS in the first place? Trial and error? Intuition?
Or in other words, are there any concrete studying techniques that can take you from "Yeah, that makes sense now that you mention it" to "Yeah, I can understand why they thought of this."