Could someone help explain how to solve the following problem:

From my understanding, this problem states that we have a function, Uniform(0, 1), that will generate a random value from 0 to 1 with uniform distribution. What I don't understand is how this translates into the random variable X or the given probability mass function.
One approach is to consider the cumulative distribution function $F(x)=P(X \le x)$
So taking a cumulative sum of the probabilities in your table, it might look like
Then look at your standard uniform random variable $U$ and