Answer
$\color{blue}{p_X(k) = \begin{cases} 1/8, & k=3 \\ 3/8, & k=1 \\ 3/8, & k=-1 \\ 1/8, & k=-3 \end{cases}}$
Work Step by Step
The total number of possible outcomes for a fair coin thst is tossed three (3) times is $2\cdot 2 \cdot 2 = 2^3 = 8$, since there are only two (2) possible outcomes (either head (H) or tail (T)) for each of the three tosses. These eight possible outcomes together with the number of heads less the number of tails per outcome are summarized in columns 2 and 5, respectively, in the table below.
These eight outcomes are equally likely so that each outcome has a probability of $1/8$ of occurring. This is so since each coss of a fair coin equally likely results in H or T, so that $P(H)=P(T)=1/2.$ Consequently, any outcome for the three tosses of a fair coin has a probability $(1/2)(1/2)(1/2) = (1/2)^3 = 1/8.$
$\begin{array}{|c|c|c|c|c|c|} \hline
\text{Row} & \text{Outcome} & \rm H & \rm T & \rm H-T & P\text{(Outcome)} \\ \hline
1 & (H,H,H) & 3 & 0 & 3-0 = 3 & 1/8 \\ \hline
2 & (H,H,T) & 2 & 1 & 2-1 = 1 & 1/8 \\ \hline
3 & (H,T,H) & 2 & 1 & 2-1 = 1 & 1/8 \\ \hline
4 & (T,H,H) & 2 & 1 & 2-1 = 1 & 1/8 \\ \hline
5 & (H,T,T) & 1 & 2 & 1-2 = -1 & 1/8 \\ \hline
6 & (T,H,T) & 1 & 2 & 1-2 = -1 & 1/8 \\ \hline
7 & (T,T,H) & 1 & 2 & 1-2 = -1 & 1/8 \\ \hline
8 & (T,T,T) & 0 & 3 & 0-3 = -3 & 1/8 \\ \hline
\end{array}$
If we let the random variable $X$ denote the number of heads less the number of tails in an outcome, then it can be readily seen from the table that the only possible values of $X$ are $3,1,-1$, and $-3$.
$X=3$ when all three tosses result in heads (so that there are no tails).
$P(X=3)=1/8$ as each coin has to come up a head (H).
$X=1$ when two of the three tosses result in H and one toss results in T.
$\displaystyle P(X=1)= {3\choose 2}\cdot {1\choose 1}\cdot (1/2)\cdot(1/2)\cdot (1/2) = 3/8$, since there are $\displaystyle {3\choose 2} = 3$ ways to choose the two tosses from three tosses that will result in H and the remaining toss to result in T, and the probability for the outcome of each of the three tosses is $1/2$. These outcomes are rows 2, 3, and 4 in the body of the table.
$X=-1$ when two of the three tosses result in T and one toss results in H.
$P(X=-1)=3/8$. This can be shown in a manner similar to that for $X=1$ by switching the roles of H and T. These outcomes are rows 5, 6, and 7 in the body of the table.
$X=-3$ when all three tosses result in T.
$P(X=3)=1/8$. This can be shown in a manner similar to that for $X=3$ by switching the roles of H and T.
Thus, all told, the pdf of $X$ is
$\begin{align*}
p_X(k) &= P(X=k),\ k =3,1,-1,-3 \\
\color{blue}{p_X(k)} &\color{blue}{= \begin{cases} 1/8, & k=3 \\ 3/8, & k=1 \\ 3/8, & k=-1 \\ 1/8, & k=-3 \end{cases}}
\end{align*}$