Let $X_i$ be 1 if the pair ${i,j}$ is in $T$’ and 0 otherwise.
The probability of $i$ and $j$ being in $S$’ is $ Pr(X_i = 1) = \frac{1}{3} \cdot \frac{1}{3} $
$ Pr(X_i = 1) = \frac{1}{9} $
There are $m$ pairs in $T$, and we are calculating the number of pairs in $T$‘.
Since there are $m$ pairs, we \sum it up $m$ times
$ \mathbb{E}(X) = \sum_{i=1}^{m} 1 \cdot Pr(X_i = 1) $
$ \mathbb{E}(X) = \sum_{i=1}^{m} 1 \cdot \frac{1}{9} $
$ \mathbb{E}(X) = \frac{m}{9} $