Matthew earns extra money by doing odd jobs for his neighbors. He charges a flat fee of $20 plus $7 per hour for each job. If he earned $90 for a job he did last week, how many hours did he work?