I have two passports ( Yemen & Somalia) I entered Egypt with my Yemen passport I’m going to Germany for family reunion but the visa is on my Somali passport

The issue is I have different date of birth and place of birth in both passports

Can I book the ticket with my Somali passport which has the visa and at exit immigration show the Yemen passport that I entered with? And would it be a problem if they asked about the visa to know that Im allowed to enter Germany? and I showed them the Somali passport with the information difference?

The correct DOB is on the Yemen passport, but here’s the thing: I have two original birth certificates each proving the Date and place of birth on the related passport.