She needs 2*2=<<2*2=4>>4 packages of flour for 2 cakes.
4 packages of flour cost 4*$3=$<<4*3=12>>12.
#### 12