The second requirement deals with timing issues. Assuming you are going to start a new job, you must actually start within a prescribed time. This time period is a year from the date of the move. This should be relatively easy to comply with as the lack of a new job within a year probably will mean you have returned to your old job and location.
The third test is known as the distance test. The IRS calls this the closely related in place test. Essentially, you have to be able to show the distance from your new residence to your new job is smaller than the distance from your previous residence to the new job. Your new job location must also be at least 50 miles from your old one. This should be pretty simple for most people to show. If you can’t meet this test, you can get around it by claiming the commute is easier and cheaper than your old one.
If you meet these tests, you can claim some nice deductions. They include travel expenses and all moving expenses reasonably related to the move including 30 days of storage. Sorry, but you don’t get to deduct hotel stays and food. Regardless, you can claim the deductions on form 3903. Just attach it to your 1040 when you file.