The time period T = 2π√(m/k). Given T=2π, so 2π = 2π√(5/k), which means k=5 N/m. The extension e caused by the ball is given by F=ke, so mg=ke. The shortening when removed is e = mg/k = (5*g)/5 = g meters.