Function to return the time when both the persons will meet for the first time
function firstTime ( $ Length , $ Speed1 , $ Speed2 ) { $ result = 0 ; $ relativeSpeed = abs ( $ Speed1 - $ Speed2 ) ; $ result = ( ( float ) $ Length / $ relativeSpeed ) ; return $ result ; }