A meaningful sentence follows the order: subject->verb->duration->place->conclusion. As per the above order, 'the hikers' is the subject, so it comes as the first part, followed by the verb 'trekked'. The sequence of duration, location and conclusion is "for hours" (time duration), "through the dense forest" (place) and "before reaching the mountain top" (conclusion).
The rearranged sentence: The hikers trekked for hours through the dense forest before reaching the mountain peal.
Hence, the correct answer is option (b).