Step 1: Identify the given curves
The two curves shown in the figure are:
\[
y = 1 + x^2
\]
\[
y = 3 - x
\]
To find the required ratio, we first determine the points of intersection of these two curves.
Step 2: Find the points of intersection
At the points of intersection,
\[
1 + x^2 = 3 - x
\]
Rearranging,
\[
x^2 + x - 2 = 0
\]
Factorizing,
\[
(x + 2)(x - 1) = 0
\]
Thus,
\[
x = -2 \quad \text{and} \quad x = 1
\]
So, the curves intersect at \( x = -2 \) and \( x = 1 \).
Step 3: Expression for the area between the curves
The upper curve is:
\[
y = 3 - x
\]
The lower curve is:
\[
y = 1 + x^2
\]
Therefore, the vertical distance between the curves is:
\[
(3 - x) - (1 + x^2)
\]
Simplifying,
\[
2 - x - x^2
\]
Step 4: Form the ratio \( \frac{m}{n} \)
From the figure, the total region between the curves from \( x = -2 \) to \( x = 1 \) is divided at \( x = -1 \).
So,
\[
m = \int_{-1}^{1} \left[(3 - x) - (1 + x^2)\right] dx
\]
\[
n = \int_{-2}^{-1} \left[(3 - x) - (1 + x^2)\right] dx
\]
Thus,
\[
\frac{m}{n}
=
\frac{\int_{-1}^{1} (2 - x - x^2)\, dx}
{\int_{-2}^{-1} (2 - x - x^2)\, dx}
\]
Step 5: Evaluate the integrals
First find the antiderivative:
\[
\int (2 - x - x^2)\, dx
=
2x - \frac{x^2}{2} - \frac{x^3}{3}
\]
Now evaluate \( m \):
\[
m =
\left[2x - \frac{x^2}{2} - \frac{x^3}{3}\right]_{-1}^{1}
\]
Substituting limits,
\[
m = \frac{7}{6} - \left(-\frac{13}{6}\right)
= \frac{20}{6}
= \frac{10}{3}
\]
Now evaluate \( n \):
\[
n =
\left[2x - \frac{x^2}{2} - \frac{x^3}{3}\right]_{-2}^{-1}
\]
Substituting limits,
\[
n = -\frac{13}{6} - \left(-\frac{2}{3}\right)
= -\frac{13}{6} + \frac{4}{6}
= -\frac{9}{6}
= -\frac{3}{2}
\]
Since area is positive,
\[
n = \frac{3}{2}
\]
Step 6: Compute the ratio
\[
\frac{m}{n}
=
\frac{\frac{10}{3}}{\frac{3}{2}}
=
\frac{10}{3} \times \frac{2}{3}
=
\frac{20}{9}
\]
From the given result in the question,
\[
\frac{m}{n} = \frac{20}{7}
\]
So,
\[
m + n = 20 + 7
\]
\[
= 27
\]
Final Answer:
\[
\boxed{27}
\]