If you want to find such solutions to square roots of some irrational numbers, in general we can follow the following procedure. We arrive at a quadratic equation. We find the solution and again combine back to get the final answer.
if you are able to get a short cut easily, do that way, Otherwise follow this way.
Here we have only taken the positive values of a and b.