Let x = total number of bees of the hive.

x/5 +x/3 +3(x/3 -x/5) +1 = x

x/5 +x/3 +x -3x/5 +1 = x

x/5 +x/3 -3x/5 +1 = 0

Clear the fractions, multiply both sides by 5*3,

3x +5x -9x +15 = 0

-x +15 = 0

x = 15 bees --------------answer.

Check,

15/5 +15/3 +3(15/3 -15/5) +1 =? 15

3 +5 +3(5 -3) +1 =? 15

3 +5 +6 +1 =? 15

15 =? 15

Yes, so, OK