Why is there a loss in C.S. and gain in P.S. when there is a tariff in a small country where there are forward shift tax?

Draw a domestic supply and demand lines. Now then, impose a flat world price Pw line that cuts below the otherwise domestic equilibrium price. (Since the country is small, it has no effect on world price) Consumer surplus CS is the area below demand but above Pw. Domestic Producer surplus (PS) is the area above domestic supply but below Pw.

Now impose a tarrif on imports. This raises the world price line from Pw to Pw' (For simplicity, keep Pw' below the domestic equilibrium price.) So, CS is now the area between demand and Pw' -- and obvious decrease. Domestic production rises to where supply cuts Pw'. PS is now the area above supply but below Pw' This should be an increase in your graph.

I hope this helps.