The 5 comes from the total ratio of the abundances you are given. (2+2+1 = 5). It would be most efficient to suppose that the abundance of Ti49 is x, because this is equal to 1. Therefore, the abundance of Ti46 and Ti47 are both equal to 2x.
The 100 comes from expressing abundance as a percentage, as the question is asking for percentage abundance. If 100 is the total abundance, then the abundance of Ti48 would be 48 lots of (100 - 5x). 48 is the relative atomic mass of the titanium isotope, 100 is the total abundance as a percentage, minus 5x which is the total abundance of the other Ti isotopes.
Therefore: (46 x 2x) + (47 x 2x) + (48(100-5x)) + (49 x 1x) / 100 = 47.8.
92x + 94x + 48 (100-5x) + 49x = 4780
235x + 4800 - 240x = 4780
-5x = -20
x = 4.
If x = 4%, then the abundance of Ti46 in the sample is 2x which = 8%,
If you wanted to make the abundance of Ti46 and Ti47 = x,
Then 46x + 47x + 48(100 - 2.5x) + (49 x 0.5x) / 100 = 47.8
93x + 4800 - 120x + 24.5x = 4780
-2.5x + 4800 = 4780
-2.5x = -20,
Therefore x = 8% which is the answer.