so you need to have BOTH readings before going into the next step
that "both" is already giving you a hint of the behaviour
in pseudocode it would be described more or less as
sendpulse1
sendpulse2
do untill you have both readings {
listenpulse1
countpulse1Distance
check_if_Sensor1_is_completely_read
listenpulse2
countpulse2Distance
check_if_Sensor2_is_completely_read
}
go on with your program
now there are a number of ways of doing this
the first than I can think of right now is this... (maybe not the most appropriate...when checking multiple conditions it's almost always a russian roulette where the result can be completely unexpected, expecially if you are not bertrand russel and master the logical flow... note that my name is beltran

hehehe)
//I'm skipping to the read both sensor code ... I assume all variable declaration for the code herafter
//create two pseudo boolean variables that tell us if the sensors have COMPLETED the reading
//completed means that after having started the counting process they receive a low value to stop counting
int readSensor1 = 0; // zero acts as boolean false ... 1 acts as boolean true
int readSensor2 = 0;
//wait untill BOTH variables are true-> untill both sensors have been completely read
while ( (readSensor1 != 1) && (readSensor2 != 1) ) {
//read both sensors
val1 = digitalRead(sensor1);
val2 = digitalRead(sensor2);
//count sensor1 only if it's high
if (val1 == HIGH) {
//add one to the count
timecount1++;
//check again inside this loop if it is actually LOW - this means that the echo has completely arrived
//note that we are not storing it into a variable because we don't need to reuse it
//it's just used to mark the boolean value to not perform the timecount operation again
if( digitalRead(sensor1) == LOW) readSensor1 = 1;
}
//count sensor 2
if (val2 == HIGH) {
timecount2++;
if( digitalRead(sensor2) == LOW) readSensor2 = 1;
}
/*NOW we either have one of the 4 following cases:
1- both sensors are still LOW -> so the readSensor1 and 2 variables haven't been marked -> hence repeat the loop
2- one of the 2 sensors or both are still HIGH -> the timing has started but not completed -> continue in the loop
3- one of the 2 sensors has been marked as "read" but not the other -> continue in the loop BUT don't perform the count on the first of the sensor marked as "read"
4- both sensors are marked as "read" -> exit the loop and continue with the program
*/
}
I haven't tryed it...it might contain mistakes

as I said it might not be the most appropriate method...there is always more than a way to skin a cat...
here you see how the && condition is applied.
try it and tell us if it works..
another thing...why don't you write a small tutorial or give us some reference for the wiki about
driving "the motor in both directions in different speeds (using the L298N and the PWM outputs)"

that would be very helpfull
wiki ->
www.arduino.cc/playgroundhope it helps
b.