Since you commented you only needed the agents’ demands as a function of the relative prices, I’m giving my answer.
I take as numeraire $p_x = 1$.
The optimization program is
$\max x + 100 (1-e^{-\frac{y}{10}})$
s.t. $x + y p_y = 40$
The optimality condition is $MRS_A = \frac{p_x}{p_y}$
$\frac{1}{10 e^{-\frac{y}{10}}} = \frac{1}{p_y} \implies \frac{p_y}{10} = e^{-\frac{y}{10}} \implies -10 \ln(\frac{p_y}{10}) = y \implies {y_A}^\star = 10 \ln(\frac{10}{p_y})$
Isolating $x$ from the budget constraint we get
$x = 40 - p_y y$
Substituting Agent $A$’s $y$-demand we get
${x_A}^\star = 40 - 10 p_y \ln(\frac{10}{p_y})$
Notice our expression for ${y_A}^\star$ is negative exactly when $p_y >10$.
So when $p_y \leq 10$, Agent $A$’s demands are the expressions we got.
On the other hand, when $p_y > 10$, the actual demands are
${y_A}^\star = 0$
${x_A}^\star = 40$
We can show with calculus that the expression for ${x_A}^\star$ attains its minimum value at $p_y = \frac{10}{e}$.
Evaluating ${x_A}^\star$ at this argument, we get its minimum value is ${x_A}^\star = 4 - \frac{10}{e} > 4 - \frac{10}{2.5} = 0$.
Since the minimum value for the expression for ${x_A}^\star$ is positive, there is no need to worry about the non-negativity constraint on this one.
The optimization program is
$\max y + 110 (1-e^{-\frac{x}{10}})$
s.t. $x + p_y y = 50 p_y$
The optimality condition is $MRS_B = \frac{p_x}{p_y}$
$11 e^{-\frac{x}{10}} = \frac{1}{p_y} \implies x = -10 \ln(\frac{1}{11 p_y}) \implies {x_B}^\star = 10 \ln(11 p_y)$
Isolating $y$ from the budget constraint we get
$y = 50 - \frac{x}{p_y}$
Substituting Agent $B$’s $x$-demand we get
${y_B}^\star = 50 - \frac{10}{p_y} \ln(11 p_y)$
Notice our expression for ${x_B}^\star$ is negative exactly when $p_y < 1$.
So when $p_y \leq 1$, Agent $B$’s demands are the expressions we got.
On the other hand, when $p_y <1$, the actual demands are
${x_B}^\star = 0$
${y_B}^\star = 50$
We can show with calculus that the expression for ${y_B}^\star$ attains its minimum value at $p_y = \frac{e}{11}$.
Evaluating ${y_B}^\star$ at this argument, we get its minimum value is ${y_B}^\star = 5 - \frac{11}{e} > 5 - \frac{11}{2.2} = 0$.
Since the minimum value for the expression for ${y_B}^\star$ is positive, there is no need to worry about the non-negativity constraint on this one.