A petroleum company has two different sources of crude oil. The first source provides crude oil that is  70%  hydrocarbons, and the second one provides crude oil that is  90%  hydrocarbons. In order to obtain 180 gallons of crude oil that is 85% hydrocarbons, how many gallons of crude oil must be used from each of the two sources?
I think the answer is:
135 gallons from the first source (70%)
45 gallons from the second source (90%)
Is this correct, or did I do this wrong?
 A: Let, $x$ & $y$ gallons of crude oil be used from each of two  sources respectively then we have
Total amount of the crude oil from both  the sources $$x+y=180\tag 1$$
Source-I:  Amount of hydrocarbons $$=x\times \frac{70}{100}=0.7 x$$ 
Source-II:  Amount of hydrocarbons $$=y\times \frac{90}{100}=0.9 y$$ 
Total amount of the hydrocarbons from both  the sources $$=0.7 x+0.9 y=180\times \frac{85}{100}$$
$$0.7x+0.9y=153\tag 2$$
Solving (1) & (2), we get $$x=45\ \text{gallons}, \ y=135\ \text{gallons}$$
$$\bbox[5px, border:2px solid #C0A000]{\color{red}{\text{Crude oil required from source-I:} = \color{blue}{45 \ \text{gallons}}}}$$
$$\bbox[5px, border:2px solid #C0A000]{\color{red}{\text{Crude oil required from source-II:} = \color{blue}{135 \ \text{gallons}}}}$$
A: Your answer is not correct, but it's not crazy.  I think you had the right idea and made a mistake in implementing it.  Your answer suggests you realized that you are mixing sources that are 70% and 90% hydrocarbons, and that 85% is 3/4 of the way between the two.  Thus, you want to take 25% from one source and 75% from the other.  
Unfortunately, your answer takes 75% from the 70% hydrocarbon source and 25% from the 90% hydrocarbon source.  You want the ratio to be the other way around.  Do you see why?  Since you realized 85% was 3/4 of the way between 70% and 90%, you need to be careful when computing, and think about which side it is closer to.
So, to get to the right answer mathematically, it might look something like this.  Let $x$ be the number of gallons of the 70% crude, and $y$ be the number of gallons of the 90% crude.  Then we have two equations:
$$ x+y = 180, \qquad .7x + .9y = (180)*.85 = 153. $$
From the first equation we can solve,
$$ y = 180 - x,$$
then plug that into the second equation
\begin{align*}
  &&.7x + .9y &= 153 \\
\implies && .7x+.9(180-x) &= 153 \\
\implies &&162 - .2x &= 153\\
\implies && .2x = 9 \\
\implies && x = 45.
\end{align*}
This is the number of gallons of the 70% source.  We then use the first equation,
$$ y = 180 - x \quad \implies \quad y = 135. $$
So we have 135 gallons of the 90% source.  Just backwards from your attempt.
Of course, I also suggest in general that you check your answers for these sorts of things.  Here's a way you could check the answer you got and see that it was wrong:
135 gallons of 70% crude = 135 * .7 = 94.5 gallons of hydrocarbons
45 gallons of 90% crude = 45 * .9 = 40.5 gallons of hydrocarbons.
Thus, you have a total of 135 gallons of hydrocarbons.  But, 
$$ \frac{135}{180} = .75 $$
So, your 180 gallon mixture only has 75% hydrocarbons instead of 85%.
So, maybe try to recompute and then check your new answer and see if it comes out as 85%.
