There are a multitude of ways to solve this, but to help you visualize it, we can use a graph to plot these points, and then form a line. Once we have a line, we can simply get the equation of the line to answer our question.
How do we plot the points?
We should obviously start out with a graph. We only need Quadrant I. We will let our x-axis (the horizontal axis) contain the number of boxes of cookies, and our y-axis (the vertical one) contain our prices.
We put our number of boxes on the x-axis because it is the independent variable, while the price per box goes on the y-axis because it is the dependent variable.
At this "point," we should be able to plot our numbers at the proper points. We can simply line up our "dot" (point) with the information given, so that Point 1 is
(2 , 14) and Point 2 is
(8 , 26). We know that information from the prompt.
Now, we simply need to draw a line that connects these 2 points.
Once we have done that, we need to remember the equation for a line. This is "y=mx+b" where "m" is our slope and "b" is our y-intercept. Our slope is going to be in a fraction with the format

, or the change in the y-value over the change in the x-value.
When we work this out, we will find that the equation for this is
y=2x+10.
Below, I have attached an image of the graph that we should make while doing this. Note that this graph "goes by 2s." The red point represents 2 boxes for 14 dollars. The blue point represents 8 boxes for 26 dollars. The green line represents the relationship between them.