Gills and lungs are a lot like each other, from a physiological point of view. They are highly vascularized, and have a large surface-to-volume ratio, so as to have as much gas exchange efficiency as possible.
Lungs work well for air because they allow ventilation through air pumping. Expand to pull oxygen-rich air in, contract to push oxygen-poor air out. This fails underwater because the latter is (approximately) seven hundred times as dense, and one hundred times as viscous as air. It is also practically incompressible. Pumping water in and out of a lung takes so much strength and energy that underwater breathing becomes inefficient, which is why we drown.
Gills, on the other hand, are adapted to the characteristics of water as a fluid. From Wikipedia:
The density of the water prevents the gills from collapsing and lying on top of each other, which is what happens when a fish is taken out of water.
How about giving your mermaid some kind of flexible-fluid lung?
Let her have a throat system much like ours, but instead being a collection of air pockets, her lungs are hollow cavities. Inside these cavities there is a large set of gills. Let the mermaid also have one or more pair or slits on her sides, right under the lower ribs and connected to those lungs. These slits can vary in size, say from five to twelve inches in length according to your creature designing taste. They can also be located more frontally if you like.
When underwater, she breathes like a fish, just with a longer circuit for the water to flow through. She takes water from the mouth and nose, let it go through the gill/lung system ("gillung"?), then it is pumped out through the rib slits.
In order to breathe air, she first expels water through the rib slits, then she closes those slits. Now she can pump air in and out of her "gillungs" (I really like this neologism) just like a human. She just has to keep a little water in to keep her internal gills moist, so that they don't collapse over each other (this is actually how land crabs breath). She might evolve some bodily fluid, maybe some mucus, to make sure that her gills won't dry out fast.
This would be much to her advantage. Quoting Wikipedia again:
In fresh water, the dissolved oxygen content is approximately 8 cm3/L compared to that of air which is 210 cm3/L.
For her to have a metabolic rate like that of a human, if she's only breathing water, she will have to rely on ram ventilation. That is, she will have to be constantly swimming to get enough oxygen, just like a shark. That would take a lot of energy. But the fact that she can breath air as well means she can go to the surface for an oxygen boost every now and then.
Add a very large concentration of myoglobinin to her muscles, and she would be able to keep that boost for long dives just like whales do. With the advantage that she won't drown if she spends too much time diving deep - she'll just revert to her slower metabolism until the next time she surfaces.
Oh, and about salt...
Just use the same solutions that nature has already found. A large tolerance for urea, like sharks; and super kidneys like those of cetaceans. This is actually the part that requires the least suspension of disbelief IMO.