解:设DC与BE相交于点G。
$\because$ 四边形ABCD是长方形,
$\therefore ∠ D=∠ A=∠ C=90°,$$AD=BC=6\ \mathrm{cm},$$CD=AB=8\ \mathrm{cm}。$
根据折叠的特征,得$△ EBP ≌ △ ABP,$
$\therefore EP=AP,$$∠ E=∠ A=90°,$$BE=BA=8\ \mathrm{cm},$
$\therefore ∠ D=∠ E。$
在$△ ODP$和$△ OEG$中,
$\begin{cases}∠ D=∠ E,\\OD=OE,\\∠ DOP=∠ EOG,\end{cases}$
$\therefore △ ODP ≌ △ OEG,$
$\therefore OP=OG,$$PD=GE,$
$\therefore OP+OE=OG+OD,$即$EP=DG。$
设$AP=x\ \mathrm{cm},$则$PD=GE=(6-x)\ \mathrm{cm},$$EP=DG=x\ \mathrm{cm}。$
$\therefore CG=CD-DG=(8-x)\ \mathrm{cm},$
$BG=BE-GE=8-(6-x)=(2+x)\ \mathrm{cm}。$
在$\mathrm{Rt}△ BCG$中,由勾股定理,得$BC^2+CG^2=BG^2,$
即$6^2+(8-x)^2=(2+x)^2,$
解得$x=4.8。$
$\therefore AP$的长为$4.8\ \mathrm{cm}。$