
You may recognize that 365 is the number of days in a non leap-year. These 365 days are composed of 7 months of 31 days, plus 4 months of 30 days, plus the 28 days in February. Therefore, 365 = 31(7) + 30(4) +28. Therefore, x = 7, y = 4, satisfies this equation.