Since f maps the interval [0,1] into the interval [0,1] and we are assuming that f(0) does not equal 0, f must be greater than 0. But then g(0) = f(0) - 0 > 0. Similarly since f(1) does not equal 1, f must be less then 1, so g(1) = f(1) - 1 < 0.