Let us solve the problem using indicator random variable.
Given $8$ vertices, the total number of $3$ cycles we can have is $\binom{8}{3}$
Let $X$ be the random variable indicating the number of number of cycles we can have in a random graph.
So $0\leq X \leq \binom{8}{3}$ [Just an observation]
So at most we can have $\binom{8}{3}$ number of $3$ cycles.
Now let us order these $\binom{8}{3}$ cycles from $1$ to $\binom{8}{3}$
Let $X_i$ be the indicator random variable indicating that our graph has $i$th cycle.
i.e. $$X_i = \begin{cases} 1 \text{ if cycle $i$ is in our graph} \\ 0 \text{ otherwise}\end{cases}$$
So, $$X= \sum_{i=0}^{\binom{8}{3}} X_i$$
Taking expection on both sides,
$$E[X]= E\left[ \sum_{i=0}^{\binom{8}{3}} X_i \right]$$
using linearity of expection we have,
$$E[X]= \sum_{i=0}^{\binom{8}{3}} E\left[X_i \right]$$
Now from the property of indicator random variable, we know
$E[X_i]=Pr\{X_i=1\}$
Now we need to find the probability that a particular cycle is included in our graph.
Now suppose $v_1,v_2,v_3$ constitutes a $3$ cycle. Then probability it shall be present in our graph is:
Pr= Probability that edge $v_1-v_2$ is present $\times$ Probability that edge $v_2-v_3$ is present $\times$ Probability that edge $v_1-v_3$ is present
=$\frac{1}{2} \times \frac{1}{2} \times \frac{1}{2} = \frac{1}{8}$
[Note that we consider only the $3$ required edges, and did not consider whether any other edges is present or not, because, our main concern is the cycle $v_1-v_2-v_3-v_1$ and we are concerned about its presence only. We do not care about the presence of other edges. They may be present or might not be present... But we do not care, and hence that probability is $1$...]
So,
$$E[X]= \sum_{i=0}^{\binom{8}{3}} E\left[X_i \right] = \binom{8}{3}*\frac{1}{8}=7$$