Molly went to play miniature golf on Monday, when it cost $7 to rent the club and ball, plus $1 per game. Sharon went Thursday, paying $2 per game, plus rental fees of $4. By coincidence, they played the same number of games for the same total cost. How much did each one spend?