Ok, first we need to figure out the lewis structure of XeF2. To do that we first need to count up the total number of valence electrons we will need in the structure. Xe contributes 8 and each fluorine contributes 7 for a total of 22 valence electrons. So now draw Xe at the center with one bond to each fluorine. Since fluorine must obey the octet rule and doesn't tolerate a positive formal charge well, we fill in its electrons first. Since each already has two electrons from the bond we only need 6 more so we put 3 lone pairs on each fluorine. So we've used a total of 16 valence electrons now so we have 6 left. These have to go on the Xe as 3 lone pairs. Ok, now, to assign the geometry, we first look at the total number of bonds plus lone pairs on the central atom. That is five (2 bonds plus 3 lone pairs). Thus, the parent geometry that corresponds to 5 lone pairs plus bonds is trigonal bipyramidal (go look up what this looks like on wikipedia). Now, because you have 3 lone pairs, two positions of that parent geometry will be taken up by atoms, and the other 3 positions will be lone pairs. The lone pairs go in the positions that are farthest apart to minimize repulsion. Thus they go in the positions that are 120 degrees apart
(in the wikipedia picture these are the positions in the middle of the structure). This leaves the fluorine atoms at the top and bottom of the structure and since these are 180 degrees apart, it's linear.
Doodl3s, it is sp3d because you have 5 lp plus sigma bonds.
XeF4 has a total of 36 valence electrons. Each fluorine is single bonded plus 3 lone pairs so that is 32 electrons. So you put 2 lp on the Xe to give 36. Since bonds plus lp is 6, the parent structure is octahedral. Putting the two lone pairs as far apart as possible puts them 180 degrees apart leaving the 4 fluorines 90 degrees apart around the middle (again, a figure helps). That is known as square planar since they are all on the same plane 90 degrees apart.