Okay, let's see. Sam has a 2-gallon bucket of milk, and he's walking 3 miles to his house. But there's a leak in the bucket. For each mile he walks, the amount of milk left is 2/3 of what it was at the beginning of the mile. Hmm, so each mile, the milk decreases by a factor of 2/3. I need to figure out how much milk is left after 3 miles.

First, maybe I should break it down mile by mile. Let's start with the first mile. At the beginning of the first mile, he has 2 gallons. After walking one mile, the milk left would be 2 multiplied by 2/3. Let me calculate that: 2 * 2/3 = 4/3 gallons. That's about 1.333 gallons after the first mile.

Then, moving to the second mile. At the start of the second mile, he has 4/3 gallons. After walking another mile, it would be 4/3 * 2/3. Let's compute that: (4/3)*(2/3) = 8/9 gallons. That's approximately 0.888 gallons after the second mile.

Finally, the third mile. Starting with 8/9 gallons, after walking the third mile, it's 8/9 * 2/3. Calculating that: (8/9)*(2/3) = 16/27 gallons. Let me convert that to decimal to check: 16 divided by 27 is approximately 0.592 gallons. So, when Sam gets home, there should be 16/27 gallons left. 

Wait, let me verify that step by step again to make sure I didn't make a mistake. Starting with 2 gallons. After first mile: 2*(2/3) = 4/3. Second mile: 4/3*(2/3) = 8/9. Third mile: 8/9*(2/3) = 16/27. Yep, that seems right. Each time multiplying by 2/3. So, after 3 miles, 2*(2/3)^3. Let me compute that formula: 2*(8/27) = 16/27. Exactly. So the final amount is 16/27 gallons. 

I think that's the correct approach. Each mile the milk is multiplied by 2/3, so after n miles, it's initial amount times (2/3)^n. Here, n=3, so 2*(2/3)^3 = 16/27. So, converting that to a decimal, it's approximately 0.592 gallons. But the question asks for the exact amount, so 16/27 is the precise answer. 

I don't see any mistakes in the calculations. Each step is a multiplication by 2/3, applied three times. The arithmetic checks out. So, the answer should be 16/27 gallons.
Therefore, when Sam gets home, the bucket will contain $\boxed{\frac{16}{27}}$ gallons of milk.
</think>