Let the odd numbers be x,x+2,x+4,x+6 and x+8.
Sum, S1 = 5x+20
Let the even numbers be y,y+2,y+4 and y+6.
Sum, S2 = 4y+12
⇒ 2(5x+20)+3(4y+12)=178 and
3(5x+20)+2(4y+12)=177
On simplifying these two equations, we get
5x+6y=51 ...(1)
15x+8y=93 ...(2)
On multiplying equation (1) by 3, we get
15x+18y=153 ...(3)
On subtracting equation (2) from (3), we get
10y=60⇒y=6
On substituting y=6 in equation (1), we get x=3.
Therefore, the odd numbers are 3, 5, 7, 9, 11 and the even numbers are 6, 8, 10, 12.
Arranging them in ascending order,
the numbers are 3,5,6,7,8,9,10,11,12.
Hence the required sum is 3 + 12 = 15.