Note that by the given assumption the gradient of $f$ is orthogonal to $\mathbf{d}=(2,-1)$ at any point $\mathbf{x}$ in the domain of $f$, i.e. $\nabla{f(\mathbf{x})}\cdot{\mathbf{d}}=0$ all $\mathbf{x}\in\mathbb{R^n}$ Now use the mean value theorem in several variables which states that for a differentiable function $f:\mathbb{R}^n\mapsto\mathbb{R} $ for every $\mathbf{a},\mathbf{b}\in \mathbb{R^n}$ there is a $\mathbf{c} \in [\mathbf{a},\mathbf{b}]$, where $[\mathbf{a},\mathbf{b}]:=\{\mathbf{x}\in \mathbb{R^n}| \mathbf{x}=t\mathbf{a}+(1-t)\mathbf{b}, t \in [0,1]\subset \mathbb{R}\}$ such that $f(\mathbf{a})-f(\mathbf{b})=\nabla{f(\mathbf{c})\cdot{}(\mathbf{a}-\mathbf{b})}$.
Now pick a point $\mathbf{a}=(a_1,a_2) \in M_c$, and let $\mathbf{b}=(b_1,b_2)\in M_c$ be arbitrary. Then clearly $\mathbf{a}=(c-2a_2,a_2)$ and $\mathbf{b}=(c-2b_2,b_2)$. From the mean value theorem above it follows that $f(\mathbf{a})-f(\mathbf{b})=\nabla{f(\mathbf{c})}\cdot(\mathbf{a}-\mathbf{b})=\nabla{f(\mathbf{c})}\cdot{}(2,-1)(b_2-a_2)=(b_2-a_2)\nabla{f(\mathbf{c})}\cdot \mathbf{d}=0$.