Answer:

30 triangular tiles and 20 square tiles
Explanation:
A triangular tile has three sides, a square tile has 4 sides.
Let x be the number of triangular tiles and y be the number of square tiles. A set of triangular and square tiles contains 50 pieces, then
x+y=50
There are 3x sides in all triangular tiles and 4y sides in all square tiles. The set of triangular and square tiles contains 170 sides, so
3x+4y=170.
Hence, the system of two equations is

From the first equation

Substitute it into the second equation:

Thus,
