"You write a book."
Translation:Kamu menulis buku.
Yes, but there's a difference in the meaning (Duolingo ignores it, but we, as learners, we have to be aware of it)
Kita includes the person you are talking to, when you say "we", and kami exclude this person.
How to know when you have to use "kita" or "kamu"? The context of course.
But on Duolingo, you can use whichever. (Unless they have a specific sentence where it would sound weird to include or exclude the person you are talking to)
Yes, each time you have "you" in English, you can translate with "kamu" or "Anda". As they don't give a context. And even "kalian", the plural you, if there's nothing in the sentence that prohibit it.
If you speak French, "kamu" is roughly equivalent to "tu", and "Anda" to the formal singular "vous".
Anda is used to show respect to someone.