Let the amount of work done by a Man and a Boy in a day be m and b, respectively.
Then, as per the question
6(25m + 10b) = 5(21m + 30b)
Or, 150m + 60b = 105m + 150b
Or, 45m = 90b
Or, m = 2b……… (i)
Now, the total amount of work
= 150 m + 60b
= 360b (substituing m from i)……(ii)
Now, let the number of boys needed be x.
So,
4(40m + xb) = 360b
Or, 80b + xb = 90b
Or, x = 10.
So, 10 boys will be needed.