For this equation we will start with the given information and write the 300 miles per 12 gallons as a rate on the left side. For the right side, we know the trip is 1,300 miles so we line that up with the 300 miles in the numerator. We will use a variable, \(x\text{,}\) for the unknown quantity of gallons. We are looking for an answer in gallons so we will use that as a double check.
\begin{gather*}
\frac{300\text{ miles}}{12\text{ gallons}}=\frac{1{,}300\text{ miles}}{x\text{ gallons}}
\end{gather*}
Now we can maintain this equal relationship and solve for \(x\) by doing the same operation on both sides of the equation. To undo division, we will multiply by one of the denominators first. To simplify the process we will remove the units for now and check them at the end.
\begin{align*}
\highlight{x}\cdot\frac{300}{12}\amp=\highlight{x}\cdot\frac{1{,}300}{x}\\
\highlight{x}\cdot\frac{300}{12}\amp=\cancel{\,x}\cdot\frac{1{,}300}{\cancel{\,x}}\\
\frac{300x}{12}\amp=1{,}300
\end{align*}
After canceling the \(x\)’s on the right side and simplifying the left side, we will multiply by the other denominator. You could do these at the same time if you prefer.
\begin{align*}
\highlight{12}\cdot\frac{300x}{12}\amp=\highlight{12}\cdot1{,}300\\
\cancel{12}\cdot\frac{300x}{\cancel{12}}\amp=\highlight{12}\cdot1{,}300
\end{align*}
After canceling the \(12\)’s we see that we have \(300x\) on the left side but we want to know what \(x\) is. We will isolate the variable by using division to undo the multiplication operation.
\begin{align*}
300x\amp=12\cdot1{,}300\\
\\
\frac{300x}{\highlight{300}}\amp=\frac{12\cdot1{,}300}{\highlight{300}}\\
\frac{\cancel{300}x}{\cancel{300}}\amp=\frac{12\cdot1{,}300}{300}\\
x\amp=\frac{12\cdot1{,}300}{300}\\
\\
\amp=52\text{ gallons}
\end{align*}
We can double check our units by putting them back in the last step to make sure they cancel properly.
\begin{align*}
x\amp=\frac{12\text{ gallons}\cdot1{,}300\,\cancel{\mathrm{ miles}}}{300\,\cancel{\mathrm{ miles}}}\\
\amp=52\text{ gallons}
\end{align*}
The miles cancel out and we are left with gallons so this is a good double check. You will need about 52 gallons of gas for the trip.