Solution:
Let the car efficiency of first car be x
Let the car efficiency of the second car be y
Given that the first car consumed 20 gallons of gas and the second consumed 40 gallons of gas. The two cars drove a combined total of 1200 miles
This can be represented as
![20x+40y=1200-----(1)](https://img.qammunity.org/2023/formulas/mathematics/college/v7z67np46vlc2qmn4bofcotcbsgpmkoqa7.png)
Given that the sum of their fuel efficiencies was 45 miles per gallon
This can be represented as
![x+y=45----------(11)](https://img.qammunity.org/2023/formulas/mathematics/college/g1i3e3us4hz4q38x6wgkgq4v1jjcv0ciki.png)
Solve both equations simultaneously
![\begin{gathered} 20x+40y=1200 \\ x+y=45 \\ x=45-y \\ thus,\text{ } \\ 20(45-y)+40y=1200 \\ 900-20y+40y=1200 \\ 900+20y=1200 \\ 20y=1200-900 \\ y=(300)/(20) \\ y=15 \\ \end{gathered}](https://img.qammunity.org/2023/formulas/mathematics/college/txx2mj9zal0no4ihp02vp6h0krg49e4qco.png)
![\begin{gathered} x+y=45 \\ x=45-y \\ x=45-15 \\ x=30 \end{gathered}](https://img.qammunity.org/2023/formulas/mathematics/college/e85j01svh4ydrcwiayta3y1j3n9dpj4xo6.png)
Thus,
First car: 30 miles per gallon
Second car: 15 miles per gallon