Katy went to play miniature golf on Monday, when it cost $1 to rent the club and ball, plus $3 per game. Jill 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?