Answer :

naǫ
x - the number of pencils
y - the number of pens

She has twice as many pencils as she has pens.
[tex]x=2y[/tex]

Tom borrows a pen, so she has y-1 pens. Now she has ten less pens than pencils.
[tex]x-10=y-1 \\ x=y-1+10 \\ x=y+9[/tex]

Set 2y and y+9 equal to each other:
[tex]2y=y+9 \\ 2y-y=9 \\ y=9[/tex]
She has 9 pens.