Your equation for g could possibly be
After, we plug in x into that equation we get the same function
Next step when solving multiple step functions is to plug in your result of your first function (in our case g) into the new function (f). This is where we need another function to get into
For this step we may say
When we plug in into our new our result is , the equation we needed to get to.