A local farmer is selling fresh produce at a farmers' market. The farmer sells apples for $2 each and bushels of potatoes for $5 each. On a busy Saturday, the farmer sold a total of 38 items for a total of $106. If the number of bushels of potatoes sold was represented as $p$ and the number of apples sold as $a$, which of the following equations correctly represents the situation?