yes, if $\sum_{i,j\in A}$ means double summation (each pair $i,j$ is taken twice) then denote $f_i$ and $g_i$ characteristic functions of your events from $A$ and $B$ respectively, LHS equals $\sum \int f_i g_j=\int (\sum f_i)(\sum g_j)$$2 \sum \int f_i g_j=\int 2(\sum f_i)(\sum g_j)$, RHS equals $\sum \int f_i^2+\sum \int g_j^2+2\sum \int f_i f_j+2\sum \int g_i g_j=\int (\sum f_i)^2+(\sum g_j)^2$, and RHS-LHS equals $\int (\sum f_i-\sum g_j)^2\geq 0$.