The join statement on line 7 has a space which is why it produces * * * instead of ***
text_2 = "".join(item)
text_2 = " "join(item)
Also the reason it is only replacing one of the "hey"s is because you are returning text_2 on line 8 but in line 7 you told the function that text_2 only equals:
" ".join(item) before this on line 6 you told the function that:
item = "*" * len(word)
so if "item" is equal to * times the length of the word, then you will only get *s for however long the word is, but it doesn't compensate for how many times the word is in the text because you are only returning the "replacement" for the word itself.
In summary all you really need to do to finish this is to find a way to insert text_2 into every spot where "word" appears. The for loop doesn't actually do the replace for each one, right now its just using each word as the number of times it will repeat the process of assigning text_2 to "***"
sorry if thats a poor explanation, let me know if i can clarify further.