時計を買うことになったよ (か is unnecessary)
先生は難しい宿題を私にさせることになったよ
ことになった and ようになった are both set phrase.
ことになった: a thing/event/plan was settled
ようになった: became (a state/habit)
e.g.
彼女とすしを食べることになった。
A plan I will eat sushi with her is settled. = I will eat sushi with her.
最近すしを食べるようになった。
(I used to not eat sushi, but) I eat sushi nowadays.
こと and よう have so many meanings other than this set phrase. It's impossible to explain all the usages.