You would have a couple of options, some I will give a quick outline for.
Firstly, your requirement appears to be one for a shared worklist, have you investigated that as an option? That could remove the routing problem altogether.
Presuming shared worklist is not what you want to do, you would have to include an event handle somewhere in the process to investigate if the other task is complete.
For example, you could have a process level variable that you set to a particular value when any route reaches task4, making the information available to the other task(s) that they too should complete.
Then you would have to follow that by investigating that value in an event, such as a reminder or a deadline, and then process the task item accordingly. (Eg have an hourly reminder that is not sent to user, at the event code investigate the process level field. If it is set to true, set the actionSelected to an action that routes the process to Task4.)
The last thought of otions for now would be to write a automatic prosessing of these items using a scheduled task (either in windows or in the DBMS) that investigates items for each process instance, and uses the API to process items automatically based on the appropriate status. This would obviously be a bit more work and woud require a detailed understanding of the API..
Hope this gives you some thoughts.