There doesn't appear to be any evidence that you ahve to eat them at the same meal. It may be a good idea to eat at least 2 different kinds of legumes, or a legume and other protein-containing foods, within a day or so of each other. Many of the nutrients of any cooked food are removed from the food solids and become emulsified in the cooking water. Beans and lentils and peas are very inexpensive. I have a problem with peanuts, but you may be able to eat them without discomfort later.
Nuts are a more expensive way to get protein.
Or, if you compare dehydrated collards with dry beans, the protein proportion is similar. Not counting water, collards are .327 protein. Not counting water, soybeans are .379 protein.