Solution:
Key idea: The conditions gof=IR and fog=IR say exactly that g is the inverse of f. So we show that f is invertible, find f−1, and check both composites.
Step 1 — Show f is one-one. Take x1,x2∈R with equal images; we subtract 7 and divide by 10.
10x1+7=10x2+7
10x1=10x2
x1=x2
Step 2 — Show f is onto. For any y∈R, the real number 10y−7 is sent to y.
f(10y−7)=10⋅10y−7+7
f(10y−7)=y
So f is a bijection and has an inverse.
Step 3 — Find the inverse. We make x the subject of y=10x+7.
10x=y−7
x=10y−7
So we take g(y)=10y−7.
Step 4 — Check gof. We put f(x) into g.
(gof)(x)=10(10x+7)−7
(gof)(x)=x
Step 5 — Check fog. We put g(x) into f.
(fog)(x)=10⋅10x−7+7
(fog)(x)=x
Both composites are the identity on R, as required.
Therefore, g(x)=10x−7.