Basic Expected Value Question I am playing the piano, but I occasionally get distracted. There are three distinct events that occur that distract me from my intended task of playing piano, which I will only do once these events are completed.

*

*The first, with probability 1/2, is a quick exercise session, that
spans for twelve minutes before I restart practicing piano.

*The second, with probability 3/10, is a small snack for me to eat,
which spans seven minutes, before I restart practicing piano.

*The third, with probability 1/5, is a restroom break, which spans
five minutes. Once I complete the third event, I finish practicing
piano.

What is the expected number of minutes that it takes for me to finish all of my distracting needs and resume practicing piano?
(I tried using the expected value formula, but for some reason I am unsure that the answer I received was correct)
I have to calculate the expected number of minutes it would take before I could resume practicing the piano.
 A: This question should have an answer or else the robots will bring it up and up again in the future. At the writing of this answer it is hard to provide helpful hints (in the sense of the self-study-tag wiki). The OP has not postet what formula they have tried to apply nor why they were unsure whether the result was correct.
Addressing the last point, whether the answer is correct, it might help to produce the correct result so the OP can compare their results to that.
An alternative way to a solution might be simulation instead of closed form computation.
We write an R function that does return either 12 minutes 1/2 of the time or zero in the other half:
maybe_exercise <- function() sample(c(0,12), 1, prob = c(.5, .5))

the same for the other tasks:
maybe_exercise <- function() sample(c(0, 12), 1, prob = c(.5, .5))
maybe_snack <- function() sample(c(0, 7), 1, prob = c(7/10, 3/10))
maybe_restroom <- function() sample(c(0, 5), 1, prob = c(4/5, 1/5))

Now for one day we can simulate the time needed before the piano lessons as
> maybe_exercise() + maybe_snack() + maybe_restroom()
[1] 24

Now let's repeat that a lot of times
time <- replicate(1e5, maybe_exercise() + maybe_snack() + maybe_restroom())
barplot(table(time), xlab = "time in minutes", ylab = "count")
mean(time)

which yields a mean of 9.10203, sometimes a little more, sometimes a litte less. Enough to validate any closed form result. I honestly hope this will also help thinking about how to find the closed form solution.
Btw: The distribution of times spend before playing piano looks like this:

