They get paid differently, or they cost their employer differently?
“Costs the company more” means they are both paid a salary of $100k, but the healthcare insurance for the employer with a family costs $50k extra.