If a cylinder and a cone are of equal height and equal bottom, and the difference between their volumes is 24 cubic decimeters, what is the volume of the cone? What is the volume of the cylinder?

If a cylinder and a cone are of equal height and equal bottom, and the difference between their volumes is 24 cubic decimeters, what is the volume of the cone? What is the volume of the cylinder?

Hello! I'd like to introduce you to two methods - arithmetic and equation method. If you don't understand, you can ask. Thank you!
① Cone volume 24 ÷ (3-1)
=24÷2
=12 (cubic decimeter)
Then cylinder volume: 12 × 3 = 36 (cubic decimeter)
A: the volume of a cone is 12 cubic decimeters, and that of a cylinder is 36 cubic decimeters
② Let the cone volume x cubic decimeter, then the cylinder volume 3x cubic decimeter
3x-x=24
2x=24
x=24÷2
x=12
A: the volume of a cone is 12 cubic decimeters, and that of a cylinder is 36 cubic decimeters
I hope my answer is helpful to you. I hope you can adopt it. Thank you!