A simple, fast approach may be to start up continuous acquistion from both the square wave and the other before the rising of the square wave.
Read continually from both and use LV code to detect the edges you are after. Until the trigger is detected, just throw away the data. If the code finds the trigger condition, save the other channel's info and then start looking for the other trigger condition.
Search examples shows how to do continuous acquisition.
Ben