Mrs. Kindred bought 19 apples of 2 different varieties to make a pie. The total cost of apples was $5.10. Granny Smith apples cost $0.25 each and Gala apples cost $0.30 each. How many of each type did Mrs. Kindred buy? Use the elimination method.

I just want someone to help explain how to lay out this equation from the story problem.

let there be

s Smith apples
g = Gala apples
Then you have been told that
s+g = 19
25s + 30g = 510
Now solve for s and g