The answer the top part of the question is 12, since Liam uses 10 marbles per bag we will know 4/10 is 4 of the marbles, so if he has three bags you will want to multiply 4 by 3 (12) then you get your answer, he has 18 non-striped ones.
The answer the bottom part of the question is also 12, since liam uses 10 marbles per bag we will know 4/10 is 4 marbles, so if he has two bags you will want to multiply 4 by 2 (8) then subtract that from 20 then you get your answer, he has 8 striped ones.
Something to make multiplying fractions easier is not to say, "4 out of 10", say, "4 every 10" (4 every time there is a 10). : )