2022: Total bonus for first 30 employees = 30 × 40000 = 1200000
Total bonus for last 30 employees = 30 × 60000 = 1800000
Total bonus for first 10 and last 10 employees = 20 × 50000 = 1000000
2023: Total bonus for first 10 employees = 10 × 2 × 40000 = 800000
Total bonus for last 10 employees = 10 × 3 × 60000 = 1800000
Total bonus for remaining 20 employees = 20 × 40000 = 800000
Total bonus in 2023 = 800000 + 1800000 + 800000 = 3400000
Average bonus in 2023 = \(\frac{\text{Total bonus}}{\text{Total employees}} = \frac{3400000}{40} = 85000\)
Therefore, the average bonus in 2023 is 85000.