Show that $f$ satisfies Lipschitz condition if it is Lipschitz on the lines with rational coordinates Let $\Omega \subset \mathbb{R}^2$ be nonempty open convex set, $f: \Omega\rightarrow \mathbb{R}$ be a continuous function such that $f_x$ and $f_y$ exist in $A=\{(x,y) \in \Omega : x \mbox{ is rational} \mbox{ or } y \mbox{ is rational}\}$ and are bounded. Show that $f$ satisfies Lipschitz condition.

Since $f$ is convex, for each two points $(x_1,y_1)$, $(x_2,y_2)$ in $A$ thanks to MVT there is some $(\overline x, \overline y)$ in $A$ such that
$$f(x_2,y_2)-f(x_1,y_1)=f_x(\overline x, \overline y)(x_2-x_1)+f_y(\overline x, \overline y)(y_2-y_1)$$
Because $f_x < M_1$ and $f_y<M_2$ in $A$, we have:
$$|f(x_2,y_2)-f(x_1,y_1)|\le |M_1 (x_2-x_1)|+|M_2(y_2-y_1)|$$
From CS inequality we know that
$$|f(x_2,y_2)-f(x_1,y_1)|\le \sqrt{M_1^2+M_2^2} \sqrt {(x_2-x_1)^2+(y_2-y_1)^2}$$
Thus $f$ is Lipschitz continuous on $A$ with constant $M=\sqrt{M_1^2+M_2^2}$.
The only thing left is to show that $f$ is Lipschitz continuous on whole $\Omega$. It seems obvious because of continuity of $f$ and the fact that rationals are dense in reals. But how to prove it formally?
 A: Claim: If $f$ is continuous on a metrix space $X$, and is Lipschitz continuous on a dense subset $A\subset X$, then it is Lipschitz continuous on $X$. 
Proof: Given $x,y\in X$, pick two sequences $x_n\to x$, $y_n\to y$ such that $x_n,y_n\in A$. By continuity of $f$ and of the distance function, 
$$
|f(x)-f(y)| = \lim_{n\to\infty} |f(x_n)-f(y_n)| \le L \lim_{n\to\infty} d(x_n,y_n) = L  d(x,y)
$$
as desired.

Concerning your proof: you should say that MVT is used twice, to go from $(x_1,y_1)$ to $(x_2,y_1)$ and then to $(x_2,y_2)$. Which raises the issue of whether $(x_2,y_1)$ is in the domain: convexity does not guarantee that. 
To repair this gap, first work with a square $Q$ contained  in $\Omega$. You will obtain that $f$ is $M$-Lipschitz on every such square, with same constant $M$. Then, given two points $p,q\in\Omega$, cover the line segment connecting them by open squares $Q_j$. There is a partition of this segment such that every subsegment belongs to some $Q_j$ (this is a consequence of the Lebesgue number lemma, or can be proved directly). Finally, use the triangle inequality to sum over the partition.
