As you have defined g, unless you know more about f, then g is only defined at 0 and no other points in [0,2]. I mean g(1)=f(1+2)-f(1)=f(3)-f(1), but what is f(3)?
And how does what you have written show that f(1)=f(2) certainly there are continuous functions on [0,2] with f(0)=f(2) but that...