The number is 4.
If you take a number, times by 3 then add 5, you get (3x + 5).
If you take the same number and times by 7 then subtract 8, you get (7x - 8).
Set the equations equal to each other:
3x + 5 = 7x - 8
Subtract 3x from both sides:
5 = 4x - 8
Add 8 to both sides:
13 = 4x
Divide both sides by 4:
4 = x
Therefore, the number is 4.