A is the midpoint of segment PB, and Q is the midpoint of segment PR, so AB=2, and QR=3. AQ is given as 4, so the only remaining unknown side is BR. Triangles APQ and BPR are similar triangles, so the proportion PA/PB should equal AQ/BR. Setting up 2/4=4/BR, you can solve for BR to be 8. Then, just add up the 4 sides to get 2+4+3+8=17, which is E.