## Converting double integral to single integral

As stated on the image, a double integral is converted to a single one. I need to figure out the logic behind it.
Thanks.