First one:
1) Since AP = PB = 4 and triangle(APB) is a right triangle: AB2 = AP2 + BP2
---> AB2 = 42 + 42 --> AB = .......
2) Since BP = PD and P is the midpoint of BD ---> BD = 8
Since triangle(BDC) is similar to triangle(BPA), DC = 8.
3) Since(triangle(BDC) is a right triangle: BC2 = CD2 + BD2
---> BC2 = 82 + 82 ---> BC = .......
4) Now, add up the parts.
Second one: (use Pythagorean triples)
-- try a 13 -13 -20 isosceles triangle.