Let number of 25 paise coins be x and number of 50 paise coins be y.
According to given conditions, we have
x + y = 40 …(1)
and 25x + 50y = 1275 …(2)
Multiplying equation (1) by 50, we get
50x + 50y = 2000 …(3)
Subtracting equation (3) from (2), we get
-25x = - 725 implies x = 29
Substituting x = 29 in equation (1), we get
29 + y = 40 implies y = 11
Hence, number of 25 paise coins = 29 and number of 50 paise coins = 11.