How do we calculate the distance between two trigger points of one signal?

How do we calculate the distance between two trigger points of one signal?
Our bug-fighters Aleksandra Dimanić & Nemanja Stevanović show us how to implement it with two different methods!