"I hope the cake is good."
Translation:Saya berharap kuenya enak.
Hey, generally, both is acceptable. We can translate "kuenya" as his/her/their cake, but also as "the cake".
"-nya simply indicates possession or refers to a specific object already under discussion." (http://kelas-bahasa.blogspot.com/2005/09/nya-nya-nya.html)
Since we lack context here, I think that "Saya berharap kue itu bagus/enak" would be a good translation, and it is also marked correct by duolingo.
Hope this helped. :-)