Let $XOY$ be a triangle with $\angle XOY = 90^o$. Let $M$ and $N$ be the midpoints of legs $OX$ and $OY$, respectively. Suppose that $XN = 19$ and $YM =22$. What is $XY$?
1. Given that $\angle XOY = 90^\circ$, triangle $XOY$ is a right triangle with $OX$ and $OY$ as the legs and $XY$ as the hypotenuse.
2. Let $O$ be the origin $(0,0)$, $X$ be $(a,0)$, and $Y$ be $(0,b)$. Therefore, $OX = a$ and $OY = b$.
3. $M$ is the midpoint of $OX$, so $M$ has coordinates $\left(\frac{a}{2}, 0\right)$.
4. $N$ is the midpoint of $OY$, so $N$ has coordinates $\left(0, \frac{b}{2}\right)$.
5. Given $XN = 19$, we use the distance formula:
   \[
   XN = \sqrt{\left(a - 0\right)^2 + \left(0 - \frac{b}{2}\right)^2} = 19
   \]
   Simplifying, we get:
   \[
   \sqrt{a^2 + \left(\frac{b}{2}\right)^2} = 19
   \]
   Squaring both sides:
   \[
   a^2 + \frac{b^2}{4} = 361
   \]
6. Given $YM = 22$, we use the distance formula:
   \[
   YM = \sqrt{\left(0 - \frac{a}{2}\right)^2 + \left(b - 0\right)^2} = 22
   \]
   Simplifying, we get:
   \[
   \sqrt{\left(\frac{a}{2}\right)^2 + b^2} = 22
   \]
   Squaring both sides:
   \[
   \frac{a^2}{4} + b^2 = 484
   \]
7. We now have two equations:
   \[
   a^2 + \frac{b^2}{4} = 361 \quad \text{(1)}
   \]
   \[
   \frac{a^2}{4} + b^2 = 484 \quad \text{(2)}
   \]
8. To eliminate the fractions, multiply equation (1) by 4:
   \[
   4a^2 + b^2 = 1444 \quad \text{(3)}
   \]
9. Multiply equation (2) by 4:
   \[
   a^2 + 4b^2 = 1936 \quad \text{(4)}
   \]
10. Now we have:
    \[
    4a^2 + b^2 = 1444 \quad \text{(3)}
    \]
    \[
    a^2 + 4b^2 = 1936 \quad \text{(4)}
    \]
11. Solve these equations simultaneously. Multiply equation (3) by 4:
    \[
    16a^2 + 4b^2 = 5776
    \]
12. Subtract equation (4) from this result:
    \[
    16a^2 + 4b^2 - (a^2 + 4b^2) = 5776 - 1936
    \]
    \[
    15a^2 = 3840
    \]
    \[
    a^2 = \frac{3840}{15} = 256
    \]
    \[
    a = 16
    \]
13. Substitute $a^2 = 256$ back into equation (1):
    \[
    256 + \frac{b^2}{4} = 361
    \]
    \[
    \frac{b^2}{4} = 105
    \]
    \[
    b^2 = 420
    \]
    \[
    b = \sqrt{420}
    \]
14. Finally, use the Pythagorean theorem to find $XY$:
    \[
    XY = \sqrt{a^2 + b^2} = \sqrt{256 + 420} = \sqrt{676} = 26
    \]

The final answer is $\boxed{26}$.