Let $f:\mathbb{R}^2\to\mathbb{R}$ be a smooth function such that
$\dfrac{\partial f(x,t)}{\partial x}=\dfrac{\partial f(x,t)}{\partial t}$
for all $(x,t)\in\mathbb R^2$.
Does this imply that there exists some real numbers $x_0,t_0, C$ such that
$f(x_0+m,t_0+n)=f(x_0+n,t_0+m)+C$
for all $(m,n)\in\mathbb R^2$?
Note that if you fix a constant $K\in \Bbb R$ and define $g(y) = f(y, K-y)$, then by the chain rule $$g'(y) = f_x(y,K-y) - f_t(y,K-y) = 0$$ Thus, $g(y)$ is a constant function, which means that $f(x,t)$ depends only on $x+t$.