There are 35 cubes of 8 cubic decimeters and 27 cubic decimeters, with a total volume of 432 cubic decimeters. How many cubes are there

There are 35 cubes of 8 cubic decimeters and 27 cubic decimeters, with a total volume of 432 cubic decimeters. How many cubes are there

Method 1
Let X of 8 cubic meters and y of 27 cubic meters
Then x + y = 35
8X+27Y=432
The solution is: x = 27, y = 8
Method 2
If x for 8 cubic meters, 35-x for 27
Then: 8x + 27 (35-x) = 432
The solution is: x = 27
That is: 27 of 8 cubic meters, 8 of 27 cubic meters