|"cheap way to recover data from a bad sector"|
There is no cheap way.
For all practical purposes data that was on a bad sector is not recoverable if the drive itself was not able to copy the data on it to a good sector elsewhere, unless you want to pay big bucks to have a forensic data expert take a crack at it.
Even if it won't boot an operating system, for free or cheap you could try to copy data from the good sectors to elsewhere, if and only if it doesn't have a large number of bad sectors and you can still access the hard drive one way or another, by booting the laptop with something such as a Linux CD, or by connecting the drive to another working computer one way or another.
Check your hard drive with the manufacturer's diagnostics.
See the latter part of response 1 in this:
There are no diagnostics for Toshiba drives that are provided by Toshiba.
If you don't have a floppy drive, you can get a CD image diagnostic utility from most hard drive manufacturer's web sites, but obviously you would need to make a burned CD, preferably a CD-R for best compatibility, on another computer if you need to.
Seagate's Seatools will test any brand of hard drive.
Do the long test.
If the long test finds more than 99 LBA errors, the test will quit, probably because they know it is a waste of time - the problem will probably only get worse.
If the long test finds 99 or fewer LBA errors, you will probably be offered the option of zero filling the drive to see if the bad sectors can be replaced by good spare sectors, but doing that wipes the data off the whole drive - if you have data on it you don't want to lose, you must copy it to elsewhere BEFORE you zero fill the drive.
If the motherboard's bios Setup does not recognize the hard drive, the only way you can get data off of it is to pay big bucks and have an expert do it, or do what an expert would physically do yourself - if it still spins, replace the board on the drive with another one that is compatible with it, or transfer the disk(s) (platter[s]) inside the drive to a hard drive they are compatible with, but you'll need oddball tools for that, at least oddball screwdriver tips - buying a used working drive off the web that has exactly the same model number yields you the best chance of being able to do either.
"XP OS on 40 GB harddrive removed from 9 year old HP laptop"
Laptop hard drives never have a warranty longer than three years. If it's the original drive, you've gotten three times that.