Let x = number of birds there at first

"Half [of original number] went astray in fog" means (1/2)x

"One Eight [of original number] are lost in a sandstorm" means (1/8)x

"6 are killed" means 6

"42 arrive safely to Africa" means 42

The original number (that is, x) minus those lost equals those who arrived safely:

x - (1/2)x - (1/8)x - 6 = 42

8x - 4x - x - 48 = 336 [multiply my LCD=8]

3x = 384 [collect terms; add 48 to both sides]

x = 128 [divide both sides by 3]

**There were 128 birds at the start.**

Check:

A flock of birds left to go to Africa together. 128 birds at the start

Half went astray in fog. 128 - 64 leaves 64.

One Eight are lost in a sandstorm. 64 - 16 = 48 left.

6 are killed 48 - 6 = 42 left.

Finally 42 arrive safely to Africa. Yes !! 42 made it.

Half went astray in fog. 128 - 64 leaves 64.

One Eight are lost in a sandstorm. 64 - 16 = 48 left.

6 are killed 48 - 6 = 42 left.

Finally 42 arrive safely to Africa. Yes !! 42 made it.