Okay, let's call these different crude oils A and B (random letters), where A represents the gallons of the first source, and B represents the gallons from the second source.
Together, A+B=140
That's the easy question.
Next, write one for the actual % of hydrocarbons:
.45A + .95B = .55(140), or .45A + .95B = 77
There are many methods to solve two equations with two unknowns, but I'll do this one using the substation method, which first solves one of the equations for one of the variables.
A=140-B (rearranging the first equation to show A=)
.45 (140-B) + .95B = 77 (plugging that previous step into the second equation)
63-.45B+.95B = 77 (distribute)
63+.5B=77 (combine B's)
.5B=14
B=28
Once you have one answer, you can go back into either equation to get the other, but the first equation here is far easier mathematically, so...
A=140-28
A=112