How can an equation be simplified to find the difference between two triangles based on their perimeters?