Let m and n are the numbers of sides of the two polygons. Then your first equation is ((m-2)*180 - (n-2)*180 = 900, or (m-2) - (n-2) = 900/180 = 5, or m - n = 5. (1) Your second equation is m + n = 25. (2) Add equations (1) and (2). You get 2m = 5+25 = 30 ====> m = 15. Then from (2) n = 25-15 = 10. Answer. 15 and 10 sides.