A store sells hardcover books for $8 and paperback books for $5. You buy 7 books, represented by the equation x + y = 7, where x is the number of hardcover books and y is the number of paperback books. The equation 8x + 5y = 38 represents the total cost. How many of each type of book did you buy?
