12. (15 points) Two squares $A B C D$ and $B E F G$ with side lengths of $8 \mathrm{~cm}$ and $6 \mathrm{~cm}$ respectively are placed side by side as shown in the figure. Connecting $D E$ intersects $B C$ at $P$. What is the area of the shaded region $A P E G$ in the figure?
【Analysis】 $\triangle B E P \sim \triangle A E D$, so $P B: D A=B E: A E=6:(6+8)=3: 7$, since $A D=8$, then $P B: 8=3: 7, P B=\frac{24}{7}$, thus $P G=B G-P B=6-\frac{24}{7}=\frac{18}{7}$, then according to the area formula of a triangle, the area of the shaded part $A P E G$ is $\frac{18}{7} \times(8+6) \div 2$, calculate accordingly.

【Solution】According to the analysis,
Since $P B \perp A E, D A \perp A E$,
Therefore, $\triangle B E P \sim \triangle A E D$,
So $P B: D A=B E: A E=6:(6+8)=3: 7$,
Since $A D=8$, then $P B: 8=3: 7$,
So $P B=\frac{24}{7}$,
Then $P G=B G-P B=6-\frac{24}{7}=\frac{18}{7}$,
The area of the shaded part $A P E G$ is: $\frac{18}{7} \times(8+6) \div 2=18$ (square centimeters);
Answer: The area of the shaded part $A P E G$ in the figure is 18 square centimeters.