I noticed a few people were confused about the choice of height for the triangle, so here is my explanation :)
m is the amount of crops that you can grow in 1 square unit of area.
c = mx*x is the amount of crops you can grow in a square field of length x.
So, c = m*Area of Square
For triangle, c = m* Area of Triangle = m (base*height)/2
Base = ax*x + b*x
Choose height = 2x/m so that:
c = m (ax*x + b)*(2x/m)/2
the m on the numerator is divided by m on the denominator to give 1, and 2/2 also gives 1
So, height = 2x/m means that the m "cancels out" and so does the 2 to give the desired quadratic formula:
c = ax*x + b*x

I noticed a few people were confused about the choice of height for the triangle, so here is my explanation :)

m is the amount of crops that you can grow in 1 square unit of area.

c = mx*x is the amount of crops you can grow in a square field of length x.

So, c = m*Area of Square

For triangle, c = m* Area of Triangle = m (base*height)/2

Base = ax*x + b*x

Choose height = 2x/m so that:

c = m (ax*x + b)*(2x/m)/2

the m on the numerator is divided by m on the denominator to give 1, and 2/2 also gives 1

So, height = 2x/m means that the m "cancels out" and so does the 2 to give the desired quadratic formula:

c = ax*x + b*x

Hope this helps.