First of all, the word Yahud is not Arabic. The sons of Jacob (pbuh) were divided into 12 tribes after him. After the death of Solomon (pbuh), 12 tribes of Israel divided into two kingdoms. Northern Kingdom of Israel, and Kingdom of Judah. Yahud means, ‘person from the Kingdom of Judah’.
In the expression “الَّذِينَ هَادُوا” in Chapter Hajj 22:17 the word “هَادُوا“ is in past (madhi) tense in plural verb form. It means, ‘they became Judaists’.
The expression “هُودًا“ in Baqarah 2:135 is the Ism al-fāʿil jam’i (plural active noun) form of the verb “هَادَ” that is used in 22:17.
As a result, the words mentioned in 2:135 and 22:17 are all from the root “هَادَ”. Apart from these, there are verses in which the word ” يهودي” “yahudiyyun” is used. The plural form of this noun is ” يهود ” “yahud”. Just as in the example of ” مجوسي” “majusiyyun” and pl. ” مجوس ” “majus”.
These are the words that were taken into Arabic language from the spoken language, as they were heard. That means, they were not derived from a specific word root.
To compare their meanings, we can say, the preference about belief is prominent in the words that were derived from the verb root. The other words, more frequently, emphasize on belonging to a certain religion.