These beds do not need the usual distance between each row because you are not going to walk in the bed to cultivate or harvest. Vegetables can be spaced far enough apart to be able to avoid crowding but be close enough to shade out any weeds.
For instance some companion plants for your tomatoes are onions, carrots, and parsley while cabbage and cauliflower need to be kept away. Be sure to rotate your vegetables every year, if you planted tomatoes in the green bed last year plant them into the red bed this year.
You will have fewer problems with pests gardening in raised garden beds. If you have had previous problems with burrowing rodents, a lining of chicken wire in the bottom of each will eliminate them. Weed control is much easier handle because you can walk around a raised bed without having to bend over to pull out, if you have any weeds at all.
Lastly, connect your anchors using a heavy-duty string or twine, creating a grid-like pattern of planting squares. You can see an example of the results of this process in my garden bed here: Square Foot Planting Squares.