This appreciation makes exports more expensive to foreigners, and imports cheaper to people at home, and thus causes NX to fall. The fall in NX offsets the effect of the fiscal expansion.
How do we know that Y = 0? Because maintaining equilibrium in the money market requires that Y be unchanged: the fiscal expansion does not affect either the real money supply (M/P) or the world interest rate (because this economy is “small”). Hence, any change in income would throw the money market out of whack. So, the exchange rate has to rise until NX has fallen enough to perfectly offset the expansionary impact of the fiscal policy on output.