Let x be the money distributed to the first group and y be the money distributed to the second group.
Then, x + y = 1000
Let c be the money distributed to one child in the first group and b be the money distributed to one brother in the second group.
Then, x = 5c and y = 2b
Hence 5c + 2b = 1000.