Mr. Legan went to Sports Authority and purchased some basketballs and some footballs. Basketballs (b) cost $30 each, and footballs (f) cost $25 each. He spent a total of $795. He bought 10 more basketballs than footballs .