Given:
The number of whole pies, x=6.
The number of whole cakes, y=4.
Each pie is cut into 1/3 slices.
So, the number of slices of pies obtained after cutting one pie is,
Now, the number of slices of pie made by cutting x=6 whole pies is,
Therefore, Justin made 18 slices of pies.
Hence, option D is correct.