Let x be the cost of the pencil.

If the pen costs 2 times the cost of the pencil, then it costs 2x.

Adding the cost of the pen and pencil we get 2x + x = 3x

Since the total cost is $6 then 3x = $6 therefore x = $6 / 3 = $2

One pen is equal to 2 * x which is 2 * $2 = $4

# Answer

4
<|im_start|>system
You are a helpful assistant.<|im_end|>
<|im_start|>user
A pen and pencil have a total cost of $6. If the pen costs twice as much as the pencil, what is the cost of the pen?
Please reason step by step, and put your final answer within \boxed{{}}.<|im_end|>
<|im_start|>assistant

user
4
A pen and pencil have a total cost of $6. If the pen costs twice as much as the pencil, what is the cost of the pen?
train