I think you`ve made a mistake in explaining the prisoner dilemma.
It should be that:
1. if you keep silent and your friend rats you out, you get the full charge, 10 years
2. if you rat your friend out and he also rats you out, you two share the charge, 5 years each
3. if you both keep silent, the ...