.
x + y = 12, (1) (x = #of triangles, y = #of rectangles)
3x + 4y = 44. (2) (number of sides)
From eq(1), y = 12-x. Substitute it into eq(2). You will get
3x + 4*(12-x) = 44
3x + 48 - 4x = 44,
-x = 44 - 48 = -4 ====> x = 4.
Answer. 4 triangles and 12-4 = 8 rectangles.