First question, do the tasks differ from each other? If not you could create only one task and assign it to both teams and whoever claims the task first will do the job.
If that is not the case, you could use interrupting boundary events (currently supported on sub process only) so when first task completes it throws an signal event at each task is listening for such signal whenever such signal arrives it cancels activity that it is bound to.
HTH