in a parking lot there are totally 70 vehicles, cars and motorcycles. all together they've got 258 wheels. how many cars are there and how many motorcycles are there in the parking lot?

i need to understand how this was solved, thank you



Answer :

1 car - 4 wheels
1 motorcycle - 2 wheels

x - number of cars
y - number of motorcycles

so, there are 70 vehicles: x + y = 70
and all togeather they've got 258 wheels: 4*x + 2*y = 258
because each car has 4 wheels, so all car wheels = 4*x,
likewise 2*y for motorcycles

x + y = 70  /* 4
4 x + 2y = 258

4 x + 4 y = 280  (R1)
4 x + 2y = 258    (R2)

2y = 22  /:2      it is R1 - R2
x = 70 - y

y = 11    /motorcycles
x = 70 - 11 = 59  /cars

check:
59 + 11 = 70  ok
59 * 4 + 11 * 2 = 236 + 22 = 258  ok