Consider that there was a los of 4 yards and 10 yards respectively. Morevoer, there was a won of 12 yards.
If yards lost are considered as negative numbers and won yards as positive, you can write the previous situation as follow:
-4 - 10 + 12 add negative numbers
= -14 + 12 subtract and put the sign of the reater coefficient
= -2
It means that quarter hack lost 2 yards