so you need to find g such that that infinitely nested square root is equal to 2
I showed you somthing similar earlier.
let the nested square root be x then
x=√g+xx2=g+xx2−x−g=0x=1±√1+4g2=21±√1+4g=4±√1+4g=3we need only consider the + case1+4g=94g=8g=2