Rule 44.2 states that the penalty is two turns - including two tacks and two gybes - in the same direction. In this case, two turns were made, but they were not in the same direction. Therefore the penalty has not been done in accordance with the rules.