Respuesta :

Let

x ----> gallons consumed by the first car

y ----> gallons consumed by the second car

so

we have the system of equations

x+y=35 ------> x=35-y ------> equation 1

35x+30y=1,125 -----> equation 2

Solve the system

substitute equation 1 in equation 2

35(35-y)+30y=1,125

solve for y

1,225-35y+30y=1,125

35y-30y=1,225-1,125

5y=100

y=20

Find out the value of x

x=35-20=15

therefore

The answer is

First car 15 gallons

second car 20 gallons