[step:Decompose $\operatorname{Var}(X)$ by the number of shared edges between triangle pairs]Expand the variance:
\begin{align*}
\operatorname{Var}(X) = \sum_{T, T' \in \binom{[n]}{3}} \operatorname{Cov}\left(\mathbb{1}_{\{T \subseteq G\}}, \mathbb{1}_{\{T' \subseteq G\}}\right).
\end{align*}
Classify each ordered pair $(T, T')$ by $k := |E(T) \cap E(T')|$, the number of edges shared. There are four cases for $T, T' \in \binom{[n]}{3}$:
- $k = 0$: $T$ and $T'$ share no edge. Then $\{T \subseteq G\}$ and $\{T' \subseteq G\}$ depend on disjoint sets of edge indicators and are therefore independent, so the covariance is zero.
- $k = 1$: $T$ and $T'$ share exactly one edge. Then $|V(T) \cup V(T')| = 4$ and $|E(T) \cup E(T')| = 5$.
- $k = 2$: impossible. Two triangles sharing two edges share the endpoints of those edges, which are the three vertices of a triangle — so the triangles coincide, contradicting $k = 2$.
- $k = 3$: $T = T'$ (the diagonal).
Hence
\begin{align*}
\operatorname{Var}(X) = \underbrace{\sum_{T} \operatorname{Var}(\mathbb{1}_{\{T \subseteq G\}})}_{\text{diagonal}} + \underbrace{\sum_{\substack{T \neq T' \\ |E(T) \cap E(T')| = 1}} \operatorname{Cov}(\mathbb{1}_{\{T \subseteq G\}}, \mathbb{1}_{\{T' \subseteq G\}})}_{\text{one shared edge}}.
\end{align*}
[claim:Diagonal contribution]
\begin{align*}
\sum_{T} \operatorname{Var}(\mathbb{1}_{\{T \subseteq G\}}) \leq \mathbb{E}[X].
\end{align*}
[proof]
For each $T$, $\mathbb{1}_{\{T \subseteq G\}}$ is Bernoulli($p^3$), so
\begin{align*}
\operatorname{Var}(\mathbb{1}_{\{T \subseteq G\}}) = p^3(1 - p^3) \leq p^3 = \mathbb{E}[\mathbb{1}_{\{T \subseteq G\}}].
\end{align*}
Summing over $T \in \binom{[n]}{3}$ gives $\mathbb{E}[X]$.
[/proof]
[/claim]
[claim:One-shared-edge contribution]
\begin{align*}
\sum_{\substack{T \neq T' \\ |E(T) \cap E(T')| = 1}} \operatorname{Cov}(\mathbb{1}_{\{T \subseteq G\}}, \mathbb{1}_{\{T' \subseteq G\}}) \leq 3 n^4 p^5.
\end{align*}
[proof]
The number of ordered pairs $(T, T')$ with $T \neq T'$ and $|E(T) \cap E(T')| = 1$ is at most $\binom{n}{3} \cdot 3(n - 3)$: choose $T$ in $\binom{n}{3}$ ways, then one of $T$'s three edges to share in $3$ ways, then a fourth vertex to complete $T'$ in $(n-3)$ ways. Hence the count is at most $\binom{n}{3} \cdot 3(n-3) \leq \tfrac{n^3}{6} \cdot 3n = \tfrac{n^4}{2}$, and we use the looser bound $3 n^4$ (valid for $n \geq 1$) below to simplify.
Actually we bound the count more carefully: $\binom{n}{3} \cdot 3(n-3) \leq \frac{n^3}{6} \cdot 3n = \frac{n^4}{2}$. For each such pair, the union $E(T) \cup E(T')$ has exactly $5$ edges (three from $T$, three from $T'$, minus the shared one). The event $\{T \subseteq G\} \cap \{T' \subseteq G\}$ is the event that all $5$ edges in the union are present, which has probability $p^5$ by independence of distinct edge indicators. Therefore
\begin{align*}
\operatorname{Cov}(\mathbb{1}_{\{T \subseteq G\}}, \mathbb{1}_{\{T' \subseteq G\}}) \leq \mathbb{E}[\mathbb{1}_{\{T \subseteq G\}} \mathbb{1}_{\{T' \subseteq G\}}] = p^5.
\end{align*}
Summing,
\begin{align*}
\sum_{\substack{T \neq T' \\ |E \cap E'| = 1}} \operatorname{Cov}(\cdots) \leq \frac{n^4}{2} \cdot p^5 \leq 3 n^4 p^5.
\end{align*}
[/proof]
[/claim]
Combining the two claims,
\begin{align*}
\operatorname{Var}(X) \leq \mathbb{E}[X] + 3 n^4 p^5.
\end{align*}[/step]