They said that the play() function is non-blocking without the duration variable, but to play the proper notes at the right time, I will need to use the duration variable. Is there any way around this?
You can either stop the playing on demand or wait until the durations have expires:
while (tone1.isPlaying() || tone2.isPlaying())
/* Do nothing else while the tones are playing */ ;
Note: From the documentation it appears that .play() is NON BLOCKING even if duration is specified. The function returns immediately but the tone will continue until the duration expires.