This is wrong because you are speaking on an accrual basis but you have to consider cash. The cash (salaries and taxes) is paid out in year 1 regardless of what year you try to book it in your p&l statements
obviously if you pay salary in December, you paid in December and you have to book it that way.