Now I am not so sure, JL....the spring mass was started at equalibrium......so the mg of gravity was already being balanced by the spring.....THEN you ADDED .25 x 50 N of upward force which is what the weight experiences when you release it...I think this is correct.... the a will be 12.5 m/s^2 .
The NET force will be upward due to the spring being further stretched......the spring at equalibrium has already balanced (i.e. cancelled out) the mg .....
Did your teacher tell you the correct answer was 2.7 m/s^2 ?