Adding salt to the water increases the density of the solution because the salt increases the mass without changing the volume very much, once enough salts been added to the water the salt water solution density becomes higher than the eggs so the egg will then float