In the first part of the exercise dehors is used for outside; in the 2nd part of the sentence « dedans » gets the red line for inside, but is not incorrect - as it is commonly used, it should be accepted. (In fact the example sentence for « inside » in wordreference is almost a 'mirrored' replica of the one here, and uses both)
The last clue - Bernard is talking is irrelevant to the sentence - there is no gender agreement required. I think it is more likely to lead to some confusion than be helpful. What is its purpose?