To get g_1, they simply added x to both sides of x^3- x- 5= 0 to get x^3- 5= x.
To get g_2, they added x+ 5 to both sides to get x^3= x+ 5 and took the cube root of both sides.
To get g_3, they subtracted 5 from both sides to get x^3- x= 5, then factored, x(x^2- 1)= 5 and, finally, divided both sides by x^2- 1 to get x= 5/(x^2- 1).