To understand this quote, you first have to know that a panacea is a "cure-all," something that can cure any problem that a person (or in this case, a country) faces. In this quote, Hemingway is saying that war (inflation does not really matter in this context) is something that bad governments engage in to try to solve their problems.
This quote relates to this book because the book is somewhat cynical about war. In the book, Hemingway is trying to show that war is not the glamorous thing that it is often made out to be. He is also trying to show that war is not really a patriotic thing. As the eNotes summary (link below) says,
War is only rarely viewed in a patriotic light and more often seen as tiresome.
Governments often try to rally their people around them by going to war or creating crises. Hemingway is pointing out in this book and with this quote that war is not truly a panacea -- it is just something that bad governments use to cover up their shortcomings.