First you must understand that neither SNES nor Genesis emulation is anywhere near being perfect. With that in mind, here are some emulators for each system on the NDS:
PicoDriveDS - Genesis emulator. Latest version: v0.1.6
Snezzi DS - SNES emulator. Latest version: v0.25a
SNEmulDS - SNES emulator. Latest version: v0.3 beta
snesDS - SNES emulator. Latest version: 12/13/05
As for flash carts, there are two kinds you can buy for the DS. Slot-1 and Slot-2. Slot-1 flash carts go into the NDS card slot on the top of the DS, so all you need is the flashcard and a memory stick. Slot-1, however, does not support GBA games. Slot-2 flash carts, however, do support GBA games, but they require extra equipment, such as a PassMe, to run NDS games. A good choice for either of those would be to buy an M3 product, as they are very compatible with homebrew and have many other built-in functions as well, such as music playing, movie and photo viewing, and ebook reading.