I have two possible interpretations, and in both cases, I think it should only give 2 food.
In my first interpretation, the cards are played sequentially. Task Artisan is played, and the Scales condition is checked. The number of occupations and improvements is different, so Scales does not give any food. Then a minor improvement is played using the Task Artisan effect, and the Scales condition is checked. The number of occupations and improvements is the same, so Scales gives 2 food. The total food given is then 2 food.
In my second interpretation, Task Artisan and the Minor Improvement are played at the same time since the minor improvement must be played to resolve the Task Artisan card. The Scales condition is not checked in between playing the two cards, but instead after playing both of them. This is similar to the comments above. For example, G-Mumz says
G-Mumz wrote: ↑17 November 2022, 06:37
...both Task Artisan and the improvement played by it would be put onto your board within the same time step.
Scales however is not an immediate effect. It reads "Each time after you place an improvement or occupation..." So Scales is only checked after both cards have been played. Scales tells us to check the board state for each placed card. Both checks will find the board state in equilibrium, so you end up getting 4 food.
However when I read this, I think it means that Scales should only give 2 food. My interpretation would be that you check Scales after you play both cards. The condition is then met, so Scales gives 2 food.
Scales reads
"Each time after you place an improvement or occupation in front of you, if you then have the same number of improvements and occupations in play, you get 2 food."
so I would think that Scales checks after each time you place a card, which is one time in this interpretation, (both cards are played at the same time so there is only one "time after" the cards are played not two "times after"), not once for each card. I do not understand the argument for why you get to check twice just because you played two cards.
The wording is confusing, but this is my best reading of the card text. Also this just happened in a game I played, and my opponent got 4 food which annoyed me, so I thought I would add another comment to this thread.