Here's another link you should study very carefully. It, along with the other tips, could help you resolve your "main problem" (by getting you to think through the desired behavior of your system and then code it in a systematic way). It also has an example of a good way to use millis()...
Don't be put off by the "finite state machine" jargon.
PS: there isn't a minimum distance between two HC-SR04s, but there is a minimum time between triggering them, otherwise the echo from one could confuse the other (if that is physically possible...as it would be for two side-by-side on a table pointing up).
.