Can you guide me through solving this problem: 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?