Desmond had some pebbles. He gave 123 pebbles to Jason and 3/5 of the remaining pebbles to Ali. He was left with 1/4 of the number of pebbles he had at first. How many pebbles did he have at first?

Let Desmond have x pebbles

after the give-away:
Desmond has x - 123 - (3/5)(x - 123)
then you said:
x - 123 - (3/5)(x - 123) = (1/4)x
x - (3/5)x - (1/4)x = 123 - 369/5
3x/20 = 246/5
x = 328

check:
gave 123 to jason, so has 205 left
gave (3/5) of 205 or he gave another 123 to Ali
number left = 205-123 = 82 , which is 1/4 of the 328 he had at the start.

2/5 (x-123) = x/4

Now solve for x

Let's denote the number of pebbles Desmond had initially as "x".

Step 1: Desmond gave 123 pebbles to Jason.
After giving away 123 pebbles, Desmond is left with "x - 123" pebbles.

Step 2: Desmond gave 3/5 of the remaining pebbles to Ali.
The remaining pebbles after giving some to Jason is (x - 123) pebbles.
Desmond gave away (3/5) * (x - 123) pebbles to Ali.
So, he is left with (x - 123) - (3/5) * (x - 123) pebbles.

Step 3: Desmond was left with 1/4 of the number of pebbles he had at first.
The number of pebbles left is (x - 123) - (3/5) * (x - 123) pebbles, which is equal to (1/4) * x.
This can be represented as an equation:
(x - 123) - (3/5) * (x - 123) = (1/4) * x

Now, we can solve this equation to find the value of x, which is the number of pebbles Desmond had initially.

To find out how many pebbles Desmond had at first, we will work backwards from the information given. Let's go step by step:

1. Desmond gave 123 pebbles to Jason. So, the number of pebbles he had remaining is the original number of pebbles minus 123.

2. Desmond then gave 3/5 of the remaining pebbles to Ali. To calculate this, we need to multiply the remaining pebbles by (1 - 3/5) or (2/5). So, the number of pebbles he had after giving some pebbles to Ali is (2/5) * (original number of pebbles - 123).

3. Finally, we know that Desmond was left with 1/4 of the number of pebbles he had at first. Mathematically, this can be represented as: (2/5) * (original number of pebbles - 123) = 1/4 * (original number of pebbles).

Now, let's solve this equation to find the original number of pebbles:

(2/5) * (original number of pebbles - 123) = 1/4 * (original number of pebbles)

Multiplying both sides of the equation by 20 (LCD of 5 and 4) to clear fractions:

8 * (original number of pebbles - 123) = 5 * (original number of pebbles)

Expanding both sides of the equation:

8 * original number of pebbles - 984 = 5 * original number of pebbles

Bringing similar terms to one side:

8 * original number of pebbles - 5 * original number of pebbles = 984

Simplifying:

3 * original number of pebbles = 984

Dividing both sides of the equation by 3:

original number of pebbles = 984 / 3

Solving:

original number of pebbles ≈ 328

Therefore, Desmond had approximately 328 pebbles at first.