Since there are only $8$ possible outcomes, you can just write them out and compute the distribution of $X$ explicitly:
$$
\begin{array}{l|c} %l/c/r = left-align/centre/right-align | for a vertical bar
\mathrm{Outcome} & X = \mbox{#heads} - \mbox{#tails}\\\hline
HHH & 3 \\
HHT & 1 \\
HTH & 1 \\
HTT & -1 \\
TTT & -3 \\
TTH & -1 \\
THT & -1 \\
THH & 1
\end{array}
$$
Since each outcome is equally likely*, we have $P(X=-3) = P(X=3) = \frac{1}{8}$ and $P(X=1) = P(X=-1) = \frac{3}{8}$. Therefore
$$
F(x)= P(X\leq x) = \begin{cases}
0, & \text{if } x < -3, \\
\frac{1}{8}, & \text{if } -3 \leq x < -1 \\
\frac{1}{2}, & \text{if } -1 \leq x < 1 \\
\frac{7}{8}, & \text{if } 1 \leq x < 3 \\
1, & \text{if } x \geq 3
\end{cases}
$$
*I just reread your question and it turns out your probability of heads is $p$ which is not necessarily $\frac{1}{2}$. However you can use the above logic to generalize to any $p$.