Shut off the main water line by turning the main water valve inside the house 90 degrees.
Turn both of the ball valves on the vacuum breaker 90 degrees.
Turn the compression nut around the base of the ball valve that you want to replace counterclockwise with a pipe wrench. Turn the nut until it pulls free from the valve. The pipe under the nut should now pull free easily.
Pull the pipe out of the ball valve.
Turn the entire ball valve counterclockwise to unscrew it from the rest of the vacuum breaker. There will be water in the system, so prepare to get a little wet.
Determine whether you need a 1-inch or 3/4-inch ball valve. The size of your current system will be marked on the side of each ball valve. Purchase a replacement that is exactly the same size as your current model.
Wrap the pipe thread on the top of the new ball valve with a single layer of Teflon tape. The tape will lubricate the threads and ensure a tight fit.
Screw the new valve into the vacuum breaker, turning it clockwise until very tight. You can use a pipe wrench as needed, but you should be able to get the valve tight by hand.
Place the pipe into the bottom of the valve and press it into the valve until it won't go any further.
Turn the compression nut clockwise until tight using the pipe wrench. This will lock the pipe into the valve.
Turn both valves 90 degrees to open them, and turn on the main water line. A little water may spray from the top of the breaker as the system pressurizes.