If each blue tile has 5 sides and you know you have 3 blue tiles you can multiply 5 by 3 5 x 3 = 15 sides
Next you know the total number of sides is 30 and you just figured out that your 3 blue tiles have a total of 15 sides so you can subtract 15 from 30 to find how many sides are left 30 - 15 = 15sides
Since you know that these are not blue tiles because in the question it stated that you have 3 blue tiles. These have to be sides for red tiles.
Each red tile have 3 sides so you can divide 15 by 3 15/3 = 5