Factoring By Grouping

I am understanding whats going on so far generally but I have two specific questions. We will use this example from the book

1.Typically, How can you tell it can be solved by grouping? I can do this method provided the header tells me "solve by grouping" but odds are if a factor grouping problem was put into a test randomly with other factoring problems I wouldnt be able to spot it.
2. I cant seem to remember why at this point the two merge into one. Why are we able to do this again?

As for your second question: 2 variables in an expression is a good hint that it needs factoring by grouping.

Now you got a bag of tricks. How do you know which one to use? Try everything. Some expressions can be factored on the go. Other expressions needs some more work. Try all the easy ways first, and if that fails, then try the less easier ways, and so on. Eventually, with practice, you'll get the hang of it.