The left edge of the trapezoid goes from (-2, 2), on the left, to (4, 5), on the right. Since it is a line, its equation is of the form y= ax+ b. Setting x= -2, y= 2, that gives the equation 2= a(-2)+ b or -2a+ b= 2. Setting x= 4, y= 5, that gives 5= a(4)+ b or 4a+ b=5, two equations to solve for b. Subtracting the first equation from the second, (4a-(-2a))+ (b- b)= 5- 2 or 6a= 3 so a= 3/6= 1/2. Putting this into 4a+ b= 5 gives 2+ b= 5 so b= 3. That is, the equation of the top line is y= (1/2)x+ 3 which is the same as the f(x)=(x/2)+ 3 shown in the picture.
Now, imagine drawing a thin rectangle from the base, y= 0 to the top line y= f(x)= (x/2)+ 3. It height is just the y value minus 0, (x/2)+ 3. We can think of the base as being the very small number \delta x. The area of that rectangle, height times base, is ((x/2)+ 3)\Delta x and, since we can cover the trapezoid by such rectangles, we can approximate the area by \sum ((x/2)+ 3)\Delta x. That's what is called a "Riemann sum". We can take the limit as the bases get smaller and smaller, converting that Riemann sum to the integral \int ((1/2)x+ 3)dx. Of course, x ranges from -2 on the left to 4 on the right so the integral is \int_{-2}^4 ((1/2)x+ 3)dx.
If F'(x)= f, that is, if f is the derivative of F (F is the anti-derivative of f) then \int_a^b f(x)dx= F(b)- F(a). You evaluate the anti-derivative at the lower and upper values, -2 and 4 in this problem and subtract.