Let \( t \) be the number of minutes after Raphael starts draining the oil.
The amount of oil remaining in Tank A after \( t \) minutes can be expressed as: \[ \text{Oil in Tank A} = 78 - 3t \]
The amount of oil remaining in Tank B after \( t \) minutes can be expressed as: \[ \text{Oil in Tank B} = 122 - 5t \]
We want to find \( t \) when the amount of oil remaining in both tanks is equal: \[ 78 - 3t = 122 - 5t \]
To solve for \( t \), we first add \( 5t \) to both sides: \[ 78 - 3t + 5t = 122 \] This simplifies to: \[ 78 + 2t = 122 \]
Next, we subtract 78 from both sides: \[ 2t = 122 - 78 \] \[ 2t = 44 \]
Now, divide by 2: \[ t = 22 \]
Now that we know \( t = 22 \), we can find out how much oil remains in each tank at this time. We can use either equation, but we'll use Tank A's equation: \[ \text{Oil in Tank A} = 78 - 3(22) = 78 - 66 = 12 \]
We can also verify using Tank B's equation: \[ \text{Oil in Tank B} = 122 - 5(22) = 122 - 110 = 12 \]
Both tanks will have the same amount of oil remaining.
Thus, after 22 minutes, the amount of oil remaining in each tank will be: \[ \boxed{12} \text{ gallons.} \]
In conclusion, the calculations show that after 22 minutes, the amounts of oil in both tanks will be equal, and each will have 12 gallons remaining.