Revised Answer:
Heres what I would do if I were you
Trigger
trigger TestTaskTrigger on Task (after insert) {
if(trigger.isInsert && trigger.isAfter){
Task_Methods.setWhat(trigger.new);
}
}
Class
public class Task_Methods{
public static void setWhat(List<Task> newList){
for(Task t : [SELECT Who.AccountId FROM Task WHERE Id IN :newList AND WhoId != null AND Who.type = 'Contact']){
t.WhatId = t.who.AccountId;
}
}
}