2. (10 points) A team of 8 people completed $\frac{2}{3}$ of a project in 30 days. Then, 4 more people were added to complete the remaining part of the project. Therefore, the total time to complete the project was $\qquad$ days.
【Analysis】Consider this project as a unit "1". Use “$\frac{2}{3} \div 30 \div 8=\frac{1}{360}$” to find the work efficiency of 1 person in 1 day. Then, the combined work efficiency of $8+4=12$ people is $\frac{1}{360} \times 12=\frac{1}{30}$. The remaining work volume is $1-\frac{2}{3}=\frac{1}{3}$. Then, according to: work volume $\div$ work efficiency = work time, calculate the time used later, and thus the total time to complete the project.

【Solution】Solution: The work efficiency of one person is: $\frac{2}{3} \div 30 \div 8=\frac{1}{360}$,
$$
8+4=12 \text { (people) }
$$
The combined work efficiency of 12 people is: $\frac{1}{360} \times 12=\frac{1}{30}$,
Total time required: $\left(1-\frac{2}{3}\right) \div \frac{1}{30}+30$
$$
\begin{array}{l}
=10+30 \\
=40 \text { (days) }
\end{array}
$$

Answer: It took a total of 40 days to complete the project.
The answer is: 40.