Solve homework2-problem2: TriangleArea