Answer: How frustrating! Unfortunately, based on your description of the pest I can't give you a positive identification of it and without a positive identification I can't give you a definite control. However, here are some thoughts. It is near the end of the season for peas since they are a cool season crop, so to be honest I would not worry too much about them. Hand pick the grubs in that section and harvest the peas as soon as practicable. If nothing else they will be "gourmet baby peas!"
Since peas and tomatoes are in different plant families altogether, it is unlikely that the pest will attack both (but not impossible). Having said that, I would suggest you take a sample to your County Extension agent for a definite identification of it and suggested controls, if any.
Generally speaking, "grubs" found above ground are actually caterpillars or larvae and can be hand picked or sprayed with Bt (Bacillus thuringiensis) according to the label instructions with good results. But without knowing what the pest actually is, this could be a total waste of time and money, so you really do need to find out what they are to be sure. Your County Extension can be reached at: 305-5742.
I hope your tomatoes will be okay.
Q&A Library Searching Tips