@neerajkumar1_1 . The 30,000(c+d) is the sum of all salaries. The 30,000 is the average salary of everyone in the company, while (c+d) is the number of people working in the company. Average * number of entities = Sum.
It is true that 30,000( c+d) = 30,000c + 30,000d. But the 30,000 is the average salary of everyone and not just the women.
To simplify, I'll use an example to illustrate . If 10 men earn an average of $25 and 20 women earn an average of $10. Is the total average* # of men / # of men = the average of men ( 25)?
(25*10 + 20*10)/30 = 450/30 = $15 is the average of the entire group.
So, while it is true that 15( 10 men + 20 women) = 450 , but 15(10)/ 10 is not the average salary of the men, given that the average is 25.
In a nutshell, the Average salary of all * # of women/# of women is not the same as the true average of women salary.
I hope this helps. Please let me know if you have any further questions.