The third equation is the result of substituting the value of g (g=b+23) in the second equation and simplyfing.
Subtract 23 from both sides to remove the constant from the variable side:
2b = 63 - 23 = 40
DIvide both sides by the coefficient of b:
b = 40/2 = 20
g = b + 23 = 20 + 23 = 43
Final check:
g + b = 43 + 20 = 63