If damage dealt is being divided or assigned among multiple permanents or players, that damage is divided or assigned before any effects that modify how much damage will be dealt. For example, if you attack the chosen player with a 5/5 creature with trample and it's blocked by a 2/2 creature they control, you can assign 2 damage to the blocker and 3 damage to the defending player. Those amounts are then doubled to 4 and 6, respectively.