If you don't want to spend a lot of money just to shape a couple of pieces of foam, then a box cutter utility knife with snap-off blade sections is a pretty good choice. Extend the blade as far out as desired to do your carving. You can use spackling compound to fill in any voids and smooth the flat ground-to-hill transition if desired. Coarse sandpaper or foam sanding blocks are good ways to smooth contours and rough up the foam surfaces before painting and applying ground cover.
A shop-vac is your BEST FRIEND when carving and sanding foam. Don't even think of working foam without one !
Paul