The mantis (and we) use eyes that are separated to get binocular vision to get two slightly different perspectives on things. Various cues from the two images and how the eyes line up give us information on how far away things are.