Benny and Some Magic - DFS problem

Hi,

I am trying to solve this problem which asks to find a path in a directed graph, so that difference between maximum weight edge on the path and minimum weight edge on the path is maximum possible.

How do I approach this problem ? I find it difficult to understand from the editorial

Link :- https://www.hackerearth.com/practice/algorithms/graphs/strongly-connected-components/practice-problems/algorithm/benny-and-some-magic/description/

Thanks !!