Let the fraction be xy. Then the first condition is x+y=7. The second condition translates to 4x=5y−8. Thus we get two equations
x+y=7,....(1)
4x−5y=−8....(2)
Multiply (1) by 4 and (2) by −1, we get
4x+4y=28
−4x+5y=8.
Adding these two, we obtain 9y=36. Hence y=4. Now x+y=7 gives x=7−y=7−4=3.
The required fraction is 34.