Let w bet the number of white cars and y the numbers of yellow cars.
"Rafael counted a total of 40 white and yellow cars" So w+y = 40.
"There were 9 times as many white cars as yellow cars" So 9Y = W
We get the system:
w+y=40 (1)
9y=w (2)
In equation (1), let's replace w by it's value from equation (2) since w=9y.
We get: 9y+y = 40
10y=40
y=4
So there's 4 yellow cars.
In equation (1), let's replace y by it's value
w+4=40
w=40-4
w=36
Rafael counted 36 white cars.
You can re-check your answer:
4+36=40 (w+y=40)
9*4=36 (9y=w)
The answer has been approved.
Hope this Helps! :)