I am sitting in a library with a laptop and a phone, and only one power socket. I wondered if eventually one of the devices will necessarily run out of power. By doing some math I figured out an answer to this question, but I feel like there should be a simpler explanation for it.
Call $a_1$ the charge speed of device $1$, $b_1$ its energy consumption speed, and similarly $a_2, b_2$ for device $2$. Assume $a_i \geq b_i$. Charging a device corresponds to translating the battery level $(x_1, x_2)^T$ by a positive multiple of one of the charging vectors $$c_1 = \begin{pmatrix} a_1 - b_1 \\ - b_2 \end{pmatrix}, \qquad c_2 = \begin{pmatrix} - b_1 \\ a_2 - b_2 \end{pmatrix}$$
Mathematically, the question is under what condition the positive cone spanned by these vectors contains a vector $(x_1, x_2)^T$ with $x_1, x_2 \geq 0$. This guarantees that none of the devices will run out of battery. If in addition $x_1, x_2 > 0$, I can assure they will be both fully charged over time.
With the angles $\theta_1, \theta_2$ defined as in the image, the question is equivalent to $\theta_1 + \theta_2 \leq \frac \pi 2$, or also $\cos(\theta_1 + \theta_2) \geq 0$. By using the sum formula for $\cos$ and computing some inner products, this gives an inequality in the $a_i$ and $b_i$, which simplifies tremendously to $$\left( \frac{a_1}{b_1} - 1 \right) \left(\frac{a_2}{b_2} - 1 \right) \geq 1 \,.$$ Note that both factors in the left hand side are nonnegative, because $a_i \geq b_i$.
Is there a more intuitive explanation why this simple inequality is the answer? What happens if I bring a third device to the library?


Any one device needs to be plugged into the charging point for some minimum proportion $P$ of any extended period of time $T$. The device is also unplugged for the proportion of time $(1-P)$. Total battery charge must not reduce over extended time periods of charging and discharging cycles.
An algebraic version of that statement is, $PT(a-b)-(1-P)Tb$ must be greater than zero.
That expression simplifies to give
$$P\ge \dfrac{b}{a}\space\space\space\space(1)$$
The same requirement, for a share of time on the charging point, applies to each device. Index the devices with subscripts $1, 2, 3, ...$.
Rewrite $(1)$ as a sum over all devices. The sum of $\dfrac{b_i}{a_i}$ over all $i$ must be less than or equal to the sum of $P_i$ over all $i$.
But time sharing is strictly limited! The sum of $P_i$ over all $i$ cannot be greater than $1$.
So
$$\sum_i\dfrac{b_i}{a_i}\le1\space\space\space(2)$$
In the special case of just two devices that condition can be written as
$\frac{b_1}{a_1} + \frac{b_2}{a_2}\le1$.
Algebraic manipulation will show that the condition above is equivalent to the alternative statement
$$\left(\dfrac{a_1}{b_1}-1\right)\left(\dfrac{a_2}{b_2}-1\right)\ge1$$