A nice way I was taught a long time ago about perimeter is to say: 'the perimeter is the distance you would travel if you walked all the way around the shape and back to where you started'.
i.e. it is the total of all the side lengths. Here the perimeter is 8 + 9 + 12 = 29km. I hope this helps you :)