William,
Replacement of the dryer is optional, but it is usually a good idea when replacing a compressor. On the other hand, replacement of the expansion valve should not be needed if the system was cooling adequately before the compressor failure. Replacement of the compressor and dryer are relatively easy for the average handyman, but due to it's inaccessible location the expansion valve is more of a job.
Gerald