The budget balance, Sg=T−G, where T is net taxes (taxes less transfer payments); positive in surplus, negative in deficit.
When to use
In Rec 03 Q6, taxes of 180 less transfers of 10 give T=170 and G=50+90=140, so Sg=30. Transfers are not government spending on output. With a balanced budget G=T, so Sg=0.
See Rec 03. Also in Read 01.