The mathematical expectation is a weighted sum:
[tex]E(X) = \displaystyle \sum_{i=1}^n x_ip(x_i)[/tex]
i.e. we multiply each outcome with its probability, and sum all these terms.
There are 16 possible outcomes for the spin, and here's table with wins/losses:
[tex]\begin{array}{c|cccc}&1&4&4&5\\1&L&L&L&L\\4&L&W&W&W\\4&L&W&W&W\\5&L&W&W&W\end{array}[/tex]
So, there are 9 winning spins and 7 losing spins. Since all the spins have the same probability, the probablity of winning $8 is 9/16, and the probability of losing $2 is 7/16. This leads to a mathematical expectation of
[tex]E(A) = 8\cdot \dfrac{9}{16}-2\dfrac{7}{16} = \dfrac{29}{8}[/tex]
In the case of the three coin flips, all triplets have the same probability of 1/8, and the eight triplets are
TTT, TTH, THT, HTT, THH, HTH, HHT, TTT
So, Danielle wins with 3 triplets, and loses with 5 triplets. The mathematical expectation is
[tex]E(B) = 6\cdot \dfrac{3}{8}-1\dfrac{5}{8} = \dfrac{13}{8}[/tex]
So, the first method is better, and the difference is 29/8-13/8 = 2.