Given we have strings of only 0's and 1's..
Hence if we have exactly 3 0's , we will have 7 1's and if we have 3 1's , we have 7 0's..
As it is clear having exactly 3 0's and exactly 3 1's not possible at the same time bcoz that would lead to length = 6 ..
Hence n(A ∩ B) = 0 here as they are mutually exclusive things.
Hence n(A U B) = n(A) + n(B) - n(A ∩ B)
= n(A) + n(B)
Now n(A) : For that we need to select 3 0's out of 10 letters and the rest will be automatically 1's. Hence number of ways = 10C3 = (10 * 9 * 8) / 6 = 120
Similarly n(B) = 120
Hence n(A U B) = 240
Hence the required number of ways = 240