"My village is close to the city of Beirut."
Translation:قَرْيَتي قَريبة مِن مَدينة بَيْروت.
I think you "AL" or the definite article. Well, here we have a genitive relation between (Madinah) and (Beirut). In other words, as it is in the English translation, "the city of Beirut". In Arabic, in compounds like this (which is called Idháfah by the way, meaning addition, because we add two nouns to each other) - In such cases or compounds, the definite article is attached to the second word not the first. You can think of it to resemble the "of" in English (just imagination, the"AL" article does NOT mean "of"). However, here we have "Beirut" which is a proper name. As a proper name, it is defined on its own and does not need AL.
Just to give a parallel example, let's suppose I want to say (the city of angels). In Arabic that would be مدينة الملائكة (madínatu al-mala'ikah). Notice that "al" is attached to the second word in the compound, الملائكة (the angels). And by the way, phonetically, this would be spelled out as (madínatul-malá'ikah).
Final point: The audio is wrong at the end of the sentence. Pronunciation should be like: qaryatí qaríbatun min madínati bayrút. (We say madínati here because it was preceded by a preposition, min, which means from).
This is because the "language mentality" works differently between English and Arabic. When you translate between any two languages, you are not supposed to translate literally word-by-word.
In English, you say for example I am close TO the city as you consider the location from your own perspective. In Arabic, we would say I am close FROM the city as speaking from the perspective of the city's location itself.
And just to note as well, nowadays in some dialects of Arabic in some places, they use (3alá على) which literally means on - so one might say I am close ON the city - but this is a dialect thing and does not go that way in the standard Arabic.
In a nutshell, it would be helpful to memorize such uses or expressions as they are because such instances of the language are not to be translated word-by-word; English does not work in the same way as Arabic, specially when it comes to prepositions.