We know that angles on a straight line add to 180 degrees. Now imagine you have a triangle and the angles are called A, B and C.

We can orientate the triangles so that we form a straight line. We can see that A, B and C lie on a straight line, so A+B+C=180.