Shouldn't the pressure be the same in both buckets, meaning that the
water does not flow?
This is from a comment, and is the crux of the reasoning for the question. The answer below explains why this reasoning is incorrect (so you lose the bet).
You are correct that the atmospheric pressure at the top surface of the water in each bucket is the same. So why does water flow if the pressure is the same? But for water not to flow, there must be no pressure difference anywhere within the water.
Consider the horizontal piece of pipe below the two buckets in your schematic. On the left side of the horizontal pipe, the pressure will be the pressure at surface of the water in bucket A plus the extra pressure from the weight of the water above it. The idea is the same for side B, of course, but there's less height of water above the horizontal pipe, so less pressure at side B than side A in the horizontal pipe. Therefore water will flow towards B. This will happen until the absolute level in the buckets are equal (ie, the height of water above the horizontal pipe is the same), eventually making the pressure on the bottom pipe the same on both ends.
This analysis can also be done in terms of energy, or forces on elements of the water, etc, and it should all come out the same. Note also that if the buckets are filled equally at the start, it's the weight of the water in the tube the provides the extra pressure, so for this to work exactly as stated, the tube should be filled with water. But having the tube filled isn't always necessary in practice, but can become tricky with issues of siphoning, priming, etc.