The solution for the intelligence test in dao’s prison is imply to put the blue and the red stone on he grey title in order for them to “connect” with the violet wall. The other tiles and stone are just there to deceive you.