The horizontal velocity of a projectile is constant, and in this case, it is calculated as v_0 cos(theta) = (35 ft/s) cos(40) = 26.81 ft/s. Therefore, for the shot put to have a horizontal distance of 40 ft, it will take (40 ft) / (26.81 ft/s) = 1.49 s.
Gravity does not affect horizontal velocity, only vertical velocity.