During ascent ball is going upward therefore its position is positive. Now , though the velocity is decreasing but its direction is upward i.e. positive. Ball is moving under the effect of gravitational acceleration , which is always acting vertically downwards so it is negative.