Option B: The phrase 'like talking to a brick wall' is an idiomatic expression. (In idiomatic expressions, the meaning is different from the literal meanings of the individual elements.) It is used for somebody who refuses to listen to you.
Hence the correct word used is 'brick' and option B is correct.
Options A, C and D: The words 'stone', 'wooden' and 'rock' do not form the required meaning in the sentence. The expression is a set phrase and cannot be substituted with another word. Hence these options are wrong.