My uncle was looking for a used riding mower, he found one with the same problem you described. It seems the rubber seal on the gas cap had cracked and a small piece had gotten into the gas line. after running a while it would run out of gas, after sitting for a short while, started up and ran great until it ran out of gas again. Remove the gas tank ,and clean, replace gas cap if needed and blow out the gas line with compressed air or replace gas line. The previous owner had changed carb, and had give up, sold it cheap. My uncle now has a almost new riding mower at a Great price. Good Luck