They find out when twilight and tails become interested in the other species(anthromorphs and magicle ponies) and the do studies on the team and mane 6.when they compare the dna, thats where the find the similarities. Equestria is based in another dimension hundreds of years in the future, future sonic and blaze send rainbow there because of a huge dissaster and ponies who look like her adopt her. Her body changes over the years quickly into a pony.