A. Companion planting can mean different things to different people. Yes, you can plant vegetables in the same family next to each other typically with no problems. These two are in the nightshade family. It is recommended however to rotate your vegetables so that vegetables of the same family are not grown in the same location year after year.
Not rotating the spots where you grow your vegetables can lead to a buildup of soil problems primarily diseases. Get to know which vegetables are in different families and try to group them so that you rotate them in different locations. I posted the families for vegetables on my blogspot.
Make sure that you follow recommended spacings for your plants. Tomatoes can vary in size tremendously due to whether they are determinate or indeterminate and their genetic potential (crossbreeding that was done). If they are too close together they will hinder in each other’s production.
Make sure you follow the spacing on the seed packet or if you bought them as transplants look the variety name up on the Internet for spacing. Usually transplant tags will give you the correct the spacing.