The pet species will be one of the two parents, or in certain cases, a hybrid. Which you get is chance, but not always even odds. Some pet types are more common.
Talents will always be from the parents combined pools, but not always the ones that have been unlocked. "Dominant" talents -- the ones that have been unlocked, or will be unlocked when the pet is trained to mega -- are more likely, but not certain.
All traits are determined at hatch, so nothing you do in training can change the outcome.
Hatch with pets that have desired talents, train, repeat until you get what you are after.