A square mile is a huge chunk of land. It's nearly 640 acres. For comparison a large suburban plot is usually only 1/8th of an acre. That is to say nothing for cost of keeping the land irrigated, free of pests and running tractors and other ag equipment to harvest the hay during growing season.
We then don't take into account the most expensive part, buying the land. In Texas a 500 acre ranch already prepped for hay or other crops costs about 1-2 million dollars to buy.
Furthermore, plants aren't perfect. Many plants also respirate co2 as well as oxygen. It's not a perfect equation like in grade school.