Recall the definition of "big O" notation: A function (or algorithm, where run time is a function of input size) $f(n)$ is said to be $O(g(n))$ if there is a constant $c$ such that
\begin{equation*}
\lim_{n\to\infty} \frac{f(n)}{g(n)} = c.\end{equation*}
In your example, you say that $a$ is $O(m)$ and $b$ is $O(n)$, but what you are really saying is that they are both linear (or sub-linear) functions of their input size. So $m$ and $n$ are just two different variable names, and therefore we may as well say that both $a$ and $b$ are $O(n)$, where $n$ is the input size.
Then it is not too hard to see that if \begin{equation*}\lim_{n\to\infty} \frac{a}{n} = c\quad\text{and}\quad \lim_{n\to\infty} \frac{b}{n} = d\end{equation*}
for some constants $c$ and $d$, then
\begin{equation*}
\lim_{n\to\infty} \frac{a+b}{n} = c +d.\end{equation*}
This shows that $a+b$ is $O(n)$.