For practical purposes, tomatoes are vegetables, peanuts are nuts, and palm trees are trees.
Tomatoes and peanuts are primarily known to be useful as food, and in the context of food, they fill the niche of vegetables and peanuts, respectively. Palm trees are useful pretty much only decoratively and to provide shade (unless you harvest them, which most people don't) so they have exactly the same utility as trees, making them trees.
It's interesting to think about how these things are biologically different from the other things in their practical category, but we strip away the utility of placing things into categories if we try to apply them outside of the context in which the category is... useful. So unless you're in a biology lesson (or you are a botanist, or just having fun with facts), tomatoes are vegetables.
Tomatoes and peanuts are primarily known to be useful as food, and in the context of food, they fill the niche of vegetables and peanuts, respectively. Palm trees are useful pretty much only decoratively and to provide shade (unless you harvest them, which most people don't) so they have exactly the same utility as trees, making them trees.
It's interesting to think about how these things are biologically different from the other things in their practical category, but we strip away the utility of placing things into categories if we try to apply them outside of the context in which the category is... useful. So unless you're in a biology lesson (or you are a botanist, or just having fun with facts), tomatoes are vegetables.