I was searching information about the puzzle n.31 as well and according to thisthis, Mensa's correct answer would be B. However, according to people's solution, depending on the reasoning applied, both B and D seems correct, this puzzle is very tricky and strange anyway. I wouldn't spend much time thinking about it.