This was a result of his having visited Wutai-shan on Pilgrimage, and having had a revelation-vision of that deity in which he was told that he could find such a set of five peaks in his nation and would experience the Bodhisattva also living there.
This outcome was a result of his pilgrimage to Wutai-shan, where he received a visionary experience of the deity, informing him that he could discover a set of five peaks in his own country and would encounter the Bodhisattva there as well.