What is backward reasoning in logic proofs? I was reading about Backward Reasoning, but I was not able to figure out how it works and what it really is.
While reading I came across the following example mentioned in Kenneth Rosen book.

Question:  Given two positive real numbers x and y, their arithmetic mean is (x + y)/2 and their geometric mean is √xy. When we compare the arithmetic and geometric means of pairs of distinct positive real numbers, we find that the arithmetic mean is always greater than the geometric mean. [For example, when x = 4 and y = 6, we have 5 = (4 + 6)/2 > √4 · 6 =√24.] Can we prove that this inequality is always true?
Solution: To prove that (x + y)/2 > √xy when x and y are distinct positive real numbers, we can work backward. We construct a sequence
of equivalent inequalities. The equivalent inequalities are
(x + y)/2 > √xy,
(x + y)2/4 > xy,
(x + y)2 > 4xy,
x2 + 2xy + y2 > 4xy,
x2 − 2xy + y2 > 0,
(x − y)2 > 0.
Because (x − y)2 > 0 when x != y, it follows that the
final inequality is true. Because all these inequalities are
equivalent, it follows that (x + y)/2 > √xy when x != y. Once we have
carried out this backward reasoning, we can easily reverse the steps
to construct a proof using forward reasoning. We now give this proof.
Suppose that x and y are distinct positive real numbers. Then (x − y)2 > 0 because the square of a nonzero real number is positive. Because (x − y)2 =  x2 - 2xy + y2 > 0. Adding 4xy to both sides, we obtain x2 + 2xy + y2 > 4xy. Because x2 + 2xy + y2 = (x + y)2, this means that (x + y)2 ≥ 4xy.
Dividing both sides of this equation by 4, we see that (x + y)2/4 > xy. Finally, taking square roots of both sides (which preserves the inequality because both sides are positive) yields (x + y)/2 > √xy. We conclude that if x and y are distinct positive real numbers, then their arithmetic mean (x + y)/2 is greater than their geometric mean √xy.

I didn't understand this proof. This proof is like if you have to prove a = b, then you add 5 both sides and get a+5 = b+5. Now using forward reasoning you prove a = b. Correct me if I am wrong.
Also, please illustrate how backward reasoning works.You can use appropriate examples.
Thank You.
 A: Ordinarily, when proving something, you start with something you already know to be true, perform some steps which shows intermediate true things, and then reach a conclusion. In backwards reasoning you start from the thing you want to prove, and then look for what conclusions you can draw from it. While doing this, you try to make your steps reversible -- for example, from $x = y$ you can always conclude $0\cdot x = 0 \cdot y$, but that doesn't really help you because that step is not reversible.
Once you reach a "conclusion" that is obviously true, and every step in the proof is reversible, just reversing your backwards proof gives you an ordinary proof.
In my opinion, you should think of this less as a proof strategy and more as a strategy for exploring a problem.
A: There are really two completely separate parts to the "solution". The first part is a method for discovering a way to prove the desired fact.
The second part is the actual proof.
Suppose you have a homework assignment to prove that
$(x + y)/2 > \sqrt{xy}$ when $x$ and $y$ are distinct positive real numbers.
Then everything in Rosen's "solution" from the beginning

To prove that $(x + y)/2 > \sqrt{xy}$ when $x$ and $y$ are distinct positive real numbers, we can work backward

up to and including the words

We now give this proof

represents things that you would think to yourself or write down on a
piece of scrap paper.
Unless the instructor has explicitly said that you are to submit
every scrap of doodling you did while working on the problem,
none of this should be written on the homework answer that
you hand in.
What should appear on your answer paper
(assuming this is a math homework in the traditional format)
is just the part that starts,

Suppose that $x$ and $y$ are distinct positive real numbers. Then $(x − y)^2 > 0$ because the square of a nonzero real number is positive.

The first sentence is justified because the thing you have to prove
only needs to be true "when $x$ and $y$ are distinct positive real numbers".
The second sentence is true for the reason stated in that sentence,
namely, we know $x - y$ is not zero (because $x$ and $y$ are real and
not equal to each other), so when we square it we get a positive number.
Neither of these sentences, nor anything that follows them, makes
any reference to any of the "scrap paper doodlings" from the first part
of the "solution".
In other words, the answer you hand in starts with the assumptions that
the theorem to be proved allows you to make, and proceeds by deriving
new statements from those assumptions, ending with the assertion of the theorem. It's a direct path from $A$ to $B$, not a circular route from $B$ to $A$ and back again to $B$.
So what was the point of the first part of the "solution"?
Think of it as a kind of road map or crib sheet that you keep handy
while you write up the actual proof.
After all, if you were just trying to write up this proof one line
at a time without having doodled anything, why would it occur to you
to square the quantity $(x - y)$?
And if you were somehow inspired to do that, why would you then
add the quantity $4xy$ to the result?
Some of us might think of this without the crib sheet, but probably only
because we've seen this kind of proof so many times before that
we remember how it goes without having to work it through backward.
A: The most common kind of proof starts from the hypotheses, does some manipulations, and gets to the conclusion. Sometimes it's not so obvious how to do this, though. In this case, you can think about what would imply your conclusion, attempting to make what's in front of you look more like your hypotheses, or like some result you already know. There are essentially two kinds of ways to do this: you can perform reversible steps, or you can come up with stronger statements that might be easier to prove from your hypotheses. The former is more common in more elementary subjects, but the latter is common too (since often the stronger statement is actually simpler).
In your example, provided that you explicitly write equivalences between each line, the "backward" proof would actually be a completely rigorous proof of the AM-GM inequality. Moreover, I think most people would actually find this easier to read, because it would not seem so sudden and arbitrary to introduce $(x-y)^2>0$ for $x \neq y$ at the start of the proof.
A very common variant of this situation occurs in "epsilon-delta" proofs in real analysis. You write the epsilon-delta implication that you want to have (where $\varepsilon$ is arbitrary and $\delta$ is to be found). Then you do some manipulations. Usually some of the manipulations are irreversible. At the end you come up with a suitable $\delta$. You could now turn the proof around, going from your chosen $\delta$ to the desired $\varepsilon$...but then, like in your AM-GM example, the start of the proof seems quite arbitrary until the middle of the proof.
