Is the word that sounds like "ustedth" (professor) related to the Spanish honorific/"formal 'you'" (Usted)? As I recall, Spanish "Usted" originally meant something closer to "your honor" or "your majesty," but has now come to be used in many countries as the formal/polite form of "you". Are either of these words also related to the vous/vosotros/voi Romance terms? Obviously Arabic and the Southern Romance languages have had a lot of historical interaction in the Mediterranean region. And, typically, whenever Spanish terminology differs from French or Italian, it's almost always because Spanish has replaced a Latin word with an Arabian one (e.g., "Ojala").
"-un/-tun" is the case ending for words in the nominative/subjective case. Here, the feminine ending "-tun" is added to the word for "professor" to show it is in the nominative case. The case ending could be added to all the words in the sentence, however case endings are only put on Arabic names and it is common to leave them off the last word in a sentence.