The volume of a rectangular slab is the length times the width times the thickness. Since you want the volume on cubic yards, change all the measurements to yards before calculating the volume.
The first slab is 30 ft by 25 ft by 4 inches which is 30/3 = 10 yards by 25/3 yards by 4/36 yards. Thus the volume os
10 25/3 4/36 = 9.3 cubic yards
Similarly the volume of the second slab is
10/3 219/3 4/36 = 27.0 cubic yards.
Hence you need about 37 cubic yards of concrete.