Two teens (boys?) find some kind of numbered cubes - possibly from a scientist's lab - which when squeezed allow them to enter the mind of someone else, which is represented by a house. In the house the person's true self is locked inside a room and they set him free. Published before 1990. Thanks!
This might be Christopher, by Richard M. Koff, copyright 1981.
Solved – I ordered and read Christopher, and you are correct! Thanks!!!