We must choose something to multiply the numerator and denominator of the fraction by the same thing, and the best thing to choose is the difference of two squares (since (x^2-y)(x^2+y)=x^2-y^2 ).
So we do (√2+1)(√2+1)/(√2-1)(√2+1). Since the (√2)^2=2, the numerator becomes 2+2√2+1, and the bottom becomes 2-1=1 (the difference of two squares). Simplifying this out becomes 2√2+3/1, which is 2√2+3