Calculating the average waiting time of tasks
From the two options, the first is the (only) reasonable approach. The second one is absolutely useless; details follow:


If you are trying to minimize the waiting time of the tasks that were shifted, then the best algorithm simply reschedules no tasks at all. The total time of transferred tasks is zero and, thus, optimal. Even if you require at least one task to be transferred, the best algorithm then simply picks the one with the least running time and transfers it to the least loaded queue. In both cases it could hardly be said the algorithm does something useful.
If you are trying to maximize the waiting time of the tasks which were rescheduled, then consider the algorithm which permutates all tasks between the devices. This naturally maximizes said measure and, again, hardly qualifies as a sensible load balancing algorithm.