It is a result of Lorenzo Robbiano's ([Term orderings on the polynomial ring][1]; see also section 1.2 of Greul and Pfister's [A Singular Introduction to Commutative Algebra][2]) that every monomial ordering on a polynomial ring in $n$ variables can be obtained from a matrix $A \in \mathrm{GL}(n, \mathbb{R})$ in the following way:
$$
x^\alpha >_A x^\beta \qquad\Leftrightarrow\qquad A\alpha > A\beta
$$
where you arrange the exponents as a column vector and the ordering on the right-hand side is 
the lexicographical ordering on $\mathbb{R}^n$.

Notice that different matrices can give rise to the same monomial ordering. E.g., there are only two different monomial orderings on $k[x]$: the lexicographical ($x > 1$) and the negative lexicographical ($1 < x$). Any 1x1 matrix with positive entry will give the first one; the second one can be obtained from any 1x1 matrix with negative entry.

Choose matrices
$$
A = (a_{ij})_{i,j = 0, \ldots, m} \in \mathrm{GL}(m+1, \mathbb{R})
$$
and
$$
B = (b_{ij})_{i,j = m, \ldots, N} \in \mathrm{GL}(N-m+1, \mathbb{R})
$$
that give rise to your original monomial orderings $>_A$ on $k[x_0, \ldots, x_m]$, and $>_B$ on $k[x_m, \ldots, x_N]$, respectively. The signs of $a_{mm}$ and $b_{mm}$ determine the restrictions of $>_A$ and $>_B$ to $k[x_m]$. If you want to "glue" this orderings then it is necessary that these coincide, i.e., that the signs of $a_{mm}$ and  $b_{mm}$ be the same. I claim that this condition is also sufficient.

We thus want to construct a matrix
$$
C = (c_{ij})_{i,j = 0, \ldots, N} \in \mathrm{GL}(N+1, \mathbb{R})
$$
Start by scaling $B$ in such a way that $a_{mm} = b_{mm}$ (you can always multiply a matrix by a positive number without changing the associated ordering). Define then

 - $c_{ij} = a_{ij}$ for $0 \leq i, j \leq m$,
 - $c_{ij} = b_{ij}$ for $m \leq i, j \leq N$,
 - $c_{ij} = 0$ otherwise.

If this matrix is invertible, then it defines an ordering $>_C$ on $k[x_0, \ldots, x_N]$ satisfying your requirements.

Let me denote by $A_i$ the columns of $A$. Since $A$ is invertible, these are $m+1$ linearly independent vectors in $\mathbb{R}^{m+1}$. The same can be said about the columns $B_i$ of $B$ as vectors in $\mathbb{R}^{N-m+1}$. Let now $C_i$ be the columns of $C$, and suppose they satisfy a linear relation
$$
\lambda_0 C_0 + \ldots + \lambda_N C_N = 0
$$
in $\mathbb{R}^{N+1}$. Projecting onto the first $m+1$ coordinates yields
$$
\lambda_0 A_0 + \ldots + \lambda_m A_m = 0
$$
which implies $\lambda_0 = \cdots = \lambda_m = 0$. Similarly, projection onto the last $N-m+1$ coordinates results in the equation
$$
\lambda_m B_m + \ldots + \lambda_N B_N = 0
$$
forcing the vanishing of the remaining $\lambda$'s and proving that the columns of $C$ are linearly independent. 


  [1]: http://www.ams.org/mathscinet-getitem?mr=826583
  [2]: http://books.google.com/books?id=7PMdgAPjscsC&lpg=PR3&dq=A%2520singular%2520introduction%2520to%2520commutative%2520algebra&pg=PR3#v=onepage&q&f=false