The ratio between the number is 3:5.
If one of the number is 3x, then the other number is 5x.
Given : 3x+85x+8=23
⇒10x+16=9x+24
⇒x=8
∴ Numbers are 3x and 5x = 3 × 8 and 5 × 8 = 24 and 40