Ya know, the Divine sometimes works in mysterious ways. While it is possible these two fellas were a ripped-off Buddha story, it is also possible that they were actual people who lead these lives so that people who were Buddhists had some examples of how to adapt their previous Buddhist tendencies to Christian ones if they had an experience that caused conversion. Is there evidence to suggest they were not real people, or at the least, a large absence of evidence?
Religious stories about the Buddha were readily and literally coopted into Christian lore by early Church writers.
Unless you presume the Buddhist stories were themselves historically accurate - which would start down a road of "both Buddhism and Christianity are true" - it's hard to imagine that these were coincidentally also stories about real figures.