Artificial intelligent assistant

Property of a continuous function with $f(0)=f(2)$ Suppose that $f$ is a continuous function on $[0,2]$ such that $f(0)=f(2)$.We have to show that there is a real number $c$ in the interval $[1,2]$, such that $f(c)=f(c-1)$. I am completely lost on this question. I have tried fiddling with Rolles theorem and the Mean Value Theorem but it hasn't worked.

Hint Consider the function $g(x)=f(x)-f(x-1)$, and the fact that it is continuous. What values does it take at $x=1$ and $x=2$ ? Consider applying Intermediate Value theorem of continuous functions.

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy 8bbd2259ecfc7ee6539d3797987ae9b5