Answer:
18 red balls, 3 blue balls, 6 yellow balls.
Explanation:
Ratios:
a ratio helps us understand the relationship between two or more values (in this case three values). More specifically it tells us how much of one item is present, for every amount another item is also present.
In this example, the ratio of red:blue:yellow is given to be: 6:1:2, which means, for every 6 red balls, there is one blue ball and two yellow balls.
In some cases, a ratio can be simplified, similar to a fraction, by dividing each number by some common factor, but in this case, the ratio cannot be simplified any further.
Solving the Problem:
Instead of directly trying to find how many red, yellow, or blue balls there are first, we can instead try solving for how many group of sixes are there in the total number of red balls. It helps to think of it this way, since for every group of six red balls there are, there is one blue ball and two yellow balls, which means we can just multiply this number by one and two to find the number of blue and yellow balls in their respective orders. For simplicity, let's assign this to the unknown "G".
Using this logic, we can set up the following equation:

For every group of six red balls... there is 6 red balls, 1 blue ball, and 2 yellow balls, adding all these together should give us the total number of balls, which was given to be 27 balls. Now we can just combine the stuff on the left into one term, by adding the coefficients.

Now divide by 9

Now that we know the number of group of six red balls there are, we can multiply six, one, and two to find the red, blue, and yellow balls.

and you can all this together, to double check, which gives us 27.