There were 16,000 people in attendance.
65% were men and 25% were women; that leaves 10% of the people in attendance. Of this 10%, 40% of them were boys, and there were 640 boys; this gives us 0.1(0.4)x = 640:
0.04x = 640
Divide both sides by 0.04:
0.04x/0.04 = 640/0.04
x = 16000