They went to an animal doctor. The vet said, "This pet is almost blind." The wife said to her husband, "What are you going to do?"

---------------------------
What is the difference between them in meaning?
1. What are you going to do?
2. What will you do?

In the last sentence #1 is used? Can we substitute #2 for #1?

3 answers

I'd write "The wife asked her husband..."

Everything else is fine.

Yes, 1 and 2 mean the same thing, and each can be substituted for the other.
If a person uses 'be going to,' does it mean that he decided what to do before?

1. What did you decided to do for that? What are you going to do?

If a person uses, will,' does it mean that he decides to do something right now?

2. What do you decide to do for that right now? What will you do?

(What about the explanation?)
Yes, "going to do" and "will" indicate that the person has already decided what he or she will do.

Correction in explanation 1: The verb should be "did you decide" -- do you see why?