The school store opened on the first day of school with 42 notebooks and pencils 18. Within two days it sold all of these items. On the first​ day, twice as many notebooks were sold as pencils. On the second​ day, for every 5 notebooks​ sold, 2 pencils were sold. How many notebooks and how many pencils were sold on each​ day?

To solve this problem, we'll use a system of equations.

Let's represent the number of notebooks sold on the first day as 'x' and the number of pencils as 'y'.

Based on the given information, we know that:
- x = 2y (twice as many notebooks were sold as pencils on the first day)
- On the second day, for every 5 notebooks sold, 2 pencils were sold

On the first day, the total number of notebooks sold is x, and the total number of pencils sold is y. So we have:
x + y = 42 (equation 1)

On the second day, we need to consider the ratio of notebooks to pencils sold. For every 5 notebooks sold, 2 pencils were sold. We can express this ratio as:
5x = 2y (equation 2)

Now, we have a system of equations:

1) x + y = 42
2) 5x = 2y

To solve this system, we can use substitution or elimination method.

Let's start with equation 2:
Rearrange equation 2 to solve for 'y':
2y = 5x
y = (5/2)x

Now, substitute the value of 'y' in equation 1:
x + (5/2)x = 42
(7/2)x = 42
Multiply both sides by 2/7:
x = 12

Now, substitute the value of 'x' back into equation 1 to find 'y':
12 + y = 42
y = 42 - 12
y = 30

Therefore, on the first day, 12 notebooks and 30 pencils were sold. And on the second day, we can calculate the number of notebooks and pencils sold using the ratio 5:2 from equation 2:
5x = 2y
5(12) = 2(30)
60 = 60

Therefore, on the second day, 60 notebooks and 60 pencils were sold.