Let's define the following variables,
x: cost of a math textbook
y: cost of a science textbook
He has to buy 3 math textbooks and 2 science textbooks, that is,
Total cost = 3x + 2y
The total cost of his textbooks is $487, then the linear equation is,
487 = 3x + 2y