From what I can guess, you probably missed the "alley". It's the part of the tutorial that teaches you how to get in the background areas and find items. The guard needs an item from the alley in order to unlock the Farms door for you.