Here are the sentences filled in with "WILL" or "TO BE GOING TO" as appropriate:
A: Why do you need so much sugar?
B: I'm going to make a cake.
A: Oh no! I've left my purse at home and I haven't got any money on me!
B: Don't worry. I will lend you some.
A: I don't know how to use this mixer.
B: That's OK. I will show you.
A: Why are all these people gathered here?
B: The Prime Minister is going to open the new hospital ward.
A: Did you remember to buy the magazine I asked for?
B: Sorry, I didn't. I will buy it when I go out again.
A: What's that on your curtains?
B: It's a stain. I’m going to take them to the dry cleaner's to get it removed.
A: These bags are very heavy. I can't lift them.
B: I will carry them for you.
A: The year you're going to Leeds University in September.
B: Yes, I’m going to study French and German.