Let x = number of cars
Then, 40-x = number of motorcycles
Each car has 4 wheels and each motorcycle has 2 wheels
So, 4x + 2(40-x) = 152
2x = 72
x = 36
There are 36 cars and 4 motorcycles in the parking garage.