The rectangle has points at (0,0) (0,h) (r,0) (r,h)

The triangle has (r,0) (r,h) and (R,0).

If you are asking what the function is for the triangle in the formula, it is because it is simply a line going from the top corner of the rectangle to the x-axis at R (I used point-slope). It will be a washer method,not diskbecause it is not adjacent to the axis of revolution