Alan, Benjamin and Charles shared a bag of toy blocks. Benjamin took 3/5 as many toy blocks as Charles. Alan took twice as many toy block as the total Benjamin and Charles took. After Alan had given 20 to Benjamin and 4 to Charles, Benjamin gave 5 to Charles. In the end, all three of them had the same number of toy blocks. Find the difference between the number of toy blocks that Alan and Benjamin had at first.

Let the no. of toy blocks Alan has be ‘a’

Let the no. of toy blocks Benjamin has be ‘b’
Let the no. of toy blocks Charles has be ‘c’
Given: b = 3/5c
a = 2 (b + c)
a - 20 - 4 = b + 20 - 5 = c + 4 + 5
a - 24 = 3/5c + 15 = c + 9
Solving, 3/5c + 15 = c + 9
15 - 9 = c - 3/5c
3 = c/5
c = 15

Therefore, b = 3 * 3 = 9
b = 9
a = 2(9 + 15) = 48
Difference number of toy blocks that Alan and Benjamin had at first = a - b = 39

To solve this problem, let's assign variables to represent the number of toy blocks each person initially had.

Let's say the initial number of toy blocks Charles had is C.

According to the problem, Benjamin took 3/5 as many toy blocks as Charles, so Benjamin had (3/5)C toy blocks.

Alan took twice as many toy blocks as the total Benjamin and Charles took, so Alan had 2[(3/5)C + C] = (6/5)C toy blocks.

After giving 20 to Benjamin, Alan had ((6/5)C - 20) toy blocks.

After giving 4 to Charles, Alan had ((6/5)C - 20 - 4) toy blocks.

After Benjamin gave 5 to Charles, Benjamin had ((3/5)C + 5) toy blocks, and Charles had (C + 4 + 5) toy blocks.

Since all three of them ended up with the same number of toy blocks, we can set up the equation:

((6/5)C - 20 - 4) = ((3/5)C + 5) = (C + 4 + 5)

To find the value of C, we can solve this equation.

((6/5)C - 20 - 4) = ((3/5)C + 5)

Multiplying through by 5 to get rid of the fractions:

6C - 100 - 20 = 3C + 25

Combining like terms:

6C - 120 = 3C + 25

Subtracting 3C from both sides:

3C - 120 = 25

Adding 120 to both sides:

3C = 145

Dividing both sides by 3:

C = 145/3

C ≈ 48.33

Therefore, Charles initially had approximately 48.33 toy blocks.

Now, let's calculate the initial number of toy blocks for Benjamin and Alan.

Benjamin had (3/5)C toy blocks, so he had (3/5)(48.33) ≈ 29 toy blocks.

Alan had (6/5)C toy blocks, so he had (6/5)(48.33) ≈ 58.67 toy blocks.

The difference between the number of toy blocks that Alan and Benjamin had at first is:

58.67 - 29 ≈ 29.67

Therefore, the difference is approximately 29.67 toy blocks.