Joe brought a bag of marbles. 1/4 of them were red,1/8 of them were green and the rest were yellow. If he brought 18 more marbles than red marbles, how many marbles did he buy?

Total marbles = x

Red = (1/4)x
Green = (1/8)x
Yellow = (1/8)x

Your question is missing a word in the part 'he brought 18 more marbles than'

Take the difference of whichever colour has 18 more marbles than red, and solve for x.

Let's solve this step by step:

Let's assume that Joe bought a total of x marbles.

Given that 1/4 of them were red, we can find the number of red marbles:

Red marbles = (1/4) * x

Given that 1/8 of them were green, we can find the number of green marbles:

Green marbles = (1/8) * x

Now, let's find the number of yellow marbles. We know that the rest of the marbles, after the red and green ones, are yellow:

Yellow marbles = x - Red marbles - Green marbles

Given that the number of yellow marbles is 18 more than the red marbles, we can set up an equation:

Yellow marbles = Red marbles + 18

Substituting the values from earlier:

x - (1/4) * x - (1/8) * x = (1/4) * x + 18

Combining like terms:

(8/8 - 2/8 - 1/8) * x = (1/4) * x + 18

Simplifying:

(5/8) * x = (1/4) * x + 18

To eliminate the fractions, let's multiply both sides by 8:

5x = 2x + 144

Now, subtract 2x from both sides:

5x - 2x = 2x + 144 - 2x

3x = 144

Finally, divide both sides by 3 to solve for x:

x = 144 / 3

x = 48

Therefore, Joe bought 48 marbles in total.

To solve this problem, let's break it down step by step:

Let's say Joe bought x marbles in total.

According to the question, 1/4 of the marbles were red. Therefore, the number of red marbles can be represented as (1/4) * x.

Similarly, 1/8 of the marbles were green. Therefore, the number of green marbles can be represented as (1/8) * x.

According to the question, the rest of the marbles were yellow. Therefore, the number of yellow marbles can be represented as the difference between the total number of marbles and the sum of red and green marbles, which is x - [(1/4) * x + (1/8) * x].

It is given in the question that Joe bought 18 more marbles than red marbles. Therefore, we can set up the following equation:

x = (1/4) * x + 18

Now, let's solve this equation:

Multiplying both sides of the equation by 4 to get rid of the fraction:

4x = x + 72

Subtracting x from both sides of the equation:

4x - x = 72

Simplifying:

3x = 72

Dividing both sides of the equation by 3:

x = 24

Therefore, Joe bought a total of 24 marbles.