The store rents wigs by the hour. He spent $40 to rent a wig for 8 hours. Write an equation to represent the relationship.