She has 9 pencils now
C = Number of Pencils N = Number of Pens You're about half done. Let's see what you get.
2N + N = M so then when Tom takes the pen it becomes 2N + N = M is now 2N = M
We have: C = Number of Pencils N = Number of Pens Mary has twice as many pencils as she has pens. C = 2N Tom borrows a pen. Now, we've only N-1 Pens Now, Mary has ten less pens than pencils C - 10 = N-1
So n=9