A man had a 10-gallon keg full of wine, and an empty jug. On Monday he drew off a jugful of wine and filled up the keg with water. On Friday, after the wine and water had been thorougly mixed, he drew off another jugful and again filled up the keg with water. The keg then contained equal quantities of wine and water.
What was the capacity of the jug?