Let the required fraction be xy where x be the numerator and y be the denominator.
First Case :
According to the question,
x+1y+1=45
⇒ 5x+5=4y+4
⇒ 5x−4y=−1
Second Case : 5 is subtracted from x and y
So, x−5y−5=12
⇒ 2x−10=y−5
⇒ 2x−y=5 ..... (2)
Multiplying equation (2) by 4 and equation (1) by 1, we get
5x−4y=−1 ..... (3)
8x−4y=20 .... (4)
Subtracting (4) from (3), we get
−3x=−21
⇒ x=7
Substituting the value of x in (2) we get
2×7−y=5
⇒ y=9
So, xy=79
Hence, the reqired fraction is 79.