I don't know what your problem is but I can help a little with explaining the code you used and maybe what is wrong with that code:
Install a package from the apt-get (this can also be installed trough synaptic)
Download the file iwlwifi-5000-ucode-5.4.A.11.tar.gz to your current folder
sudo apt-get install build-essential
unpack the file you just downloaded
copy the file sudo cp iwlwifi-5000-ucode-5.4.A.11/iwlwifi-5000-1.ucode to /lib/firmware,
unpack the file youi had to download manually, here it can go wrong if that file isn't in the directory you're working on. Try copying the file you downloaded manually to your home directory.
sudo cp iwlwifi-5000-ucode-5.4.A.11/iwlwifi-5000-1.ucode /lib/firmware
The following command isn't correct, it should be 'tar -xf ...' but I bellieve you can skip this because it does just the same as the previous command.
cd to the directory you've just unpacked
tar xf compat-wireless-old
Excecute code to compile the package
Hope I could help.
sudo make install
sudo make unload
sudo make load