I assume that you've downloaded and installed AviSynth and VirtualDub (or VirtualDubMod). If not, I recommend downloading and installing this:
AMVapp version 3.0 beta. It includes both AviSynth and VDM, a few recommended codecs (including Lagarith and Huffyuv), plus many other useful utilities and programs.
If you are intending to edit with the AviSynth files directly in Vegas, then you may wish to follow this guide:
Frameserving Avisynth to Programs without .avs Support. I've never tried VFAPI together with Vegas, so I can't vouch for how well it works (or doesn't work). Frameserving is a bit on the unresponsive side (at least for me), so I prefer to create clips.
If you are working with DivX or XviD files and are intending to create clips for editing, it actually isn't necessary to use AviSynth to load them into VirtualDubMod. VDM generally accepts them without fuss. You do miss out on some nice filters and functions that AviSynth can provide that can improve visual quality of your video sources. Although written as part of a guide to converting DVD footage, you can follow this:
Creating Clips for Source Footage and
VirtualDubMod - What it is and how to use it to obtain your clips.