The following problem is taken from Burris and Sankappanavar's A Course in Universal Algebra (11, pg 42).
Suppose $L$ is a distributive lattice and $a,b,c,d\in L$. Then $\langle a, b\rangle\in\Theta(c,d)$ if and only if $c\wedge d\wedge a = c\wedge d \wedge b$ and $c\vee d\vee a = c\vee d \vee b$.
Here, $\Theta(c,d)$ denotes the smallest congruence on $L$ that contains $(c,d)$, i.e., the principal congruence on $L$ generated by $(c,d)$.
Proving sufficiency is straightforward. However, I am not sure about where to get started on the necessary part. Any help is appreciated.