If these are contracts, they're calculated separately:
Aug:
Bought at 100 (Still with you)-(Has to be sold to realise profit/loss)
Sep:
Shorted at +150 Rs (Has to be squared off (i.e bought) to realise profit/loss)
-200 Rs+200 Rs =0 + Expenses (brokerage+ taxes etc)