I don't know of any easy way to connect your laptop to the desktop to use its wifi. In the old days, it could be done by hacking a network cable and crossing two particular wires.
if you need drivers for the laptop, download them from the desktop and transfer to a USB stick or burn them to a CD/DVD. Otherwise, you'll need to connect your laptop to your router or modem with a network cable.
Try google for a video for accessing and reseating your Compaq model's wifi card, and checking that it's antenna wires didn't fall off the little connectors
Or you can buy a USB wifi adapter from places like Best Buy or Amazon, which is easier than replacing a wifi card, as the cards are made in a couple of different slot widths and card lengths, depending on your laptop model.