This is (the second part of) Exercise 2.6.4 of Howie's "Fundamentals of Semigroup Theory". The first part is here.
The Details.
Definition 1: A lattice $(L, \le, \wedge, \vee)$ is modular if, for all $a, b, c$ in $L$, $$a\le c\implies (a\vee b)\wedge c=a\vee(b\wedge c).$$
Definition 2: The set of congruences on a semigroup $S$ is denoted $\mathcal C(S)$.
Proposition 1.8.3 (of Howie's book): Let $\mathcal K$ be a sublattice of the lattice $(\mathcal C(S), \subseteq, \cap, \vee)$ of congruences of a semigroup $S$, and suppose that $\rho\circ\sigma=\sigma\circ\rho$ for all $\rho, \sigma$ in $\mathcal K$. Then $\mathcal K$ is a modular lattice.
Definition 3: We define, for an arbitrary equivalence $E$ on a semigroup $S$, $$E^{\flat}=\{(a, b)\in S\times S : (\forall x, y\in S^1) (xay, xby)\in E\}$$ as the largest congruence on $S$ contained in $E$.
Lemma 1: Let $S$ be a semigroup, let $\lambda$ be a right congruence on $S$ contained in $\mathcal L$ and let $\rho$ be a left congruence on $S$ contained in $\mathcal R$. Then $\lambda\circ\rho=\rho\circ\lambda$.
The Question:
Deduce (from Lemma 1), using Proposition 1.8.3, that the sublattice $[1_S, \mathcal{H}^{\flat}]$, consisting of all congruences on $S$ contained in $\mathcal H$, is modular.
My Attempt:
I haven't got anywhere. It should be a simple application of the proposition.
Please help :)
By Keith Kearnes in the comments: