You did some pretty good research.
You came up with two winners.
You will be happy with either camera.
Here is a view of their specifications, side-by-side:
The only thing that jumps out is the difference in video capability. The Nikon 5900 can produce 640 x 480 at 30 fps (frames per second).
From reading reviews, the 5900 has a lot more scene modes.
Since you have your "want list" down to two excellent choices, it is time to visit a store where you can get your hands on the cameras. See how they fit and feel to you.
I have never owned a camera but have researched these two digital compacts as I would like a small camera for travel. Being a newbie, I would appreciate any suggestions. Both have good reviews from most. Obviously, quality of picture under various circumstances is important. I am leaning toward the Nikon. Thanks for any help.