9. (15 points) A store purchased a batch of pens. If it sells 20 pens at a retail price of 7 yuan each and 15 pens at a retail price of 8 yuan each, the profit earned is the same. What is the purchase price of each pen in yuan?

---

Please note that the translation retains the original format and structure, including the point value and the problem statement.
9. (15 points) A store purchased a batch of pens. If it sells 20 pens at a retail price of 7 yuan each and 15 pens at a retail price of 8 yuan each, the profit earned is the same. What is the purchase price of each pen in yuan?
【Analysis】Using equations to solve this problem is easier to understand. Let the purchase price of each pen be $x$ yuan. $(7-x) \times 20$ and $(8-x) \times 15$ represent the same amount of money. We can set up an equation to find the purchase price.
【Solution】Solution: Let the purchase price of each pen be $x$ yuan.
$$
\begin{aligned}
(7-x) \times 20 & =(8-x) \times 15, \\
140-20 x & =120-15 x, \\
5 x & =20, \\
x & =4 ;
\end{aligned}
$$

Answer: The purchase price of each pen is 4 yuan.