Both, the liver and lung cancer, usually, when detected (have become symptomatic) are already advanced cases, so, the prognosis is very poor.
Since chemotherapy kills fast growing cells like cancer cells, other normal body cells with same rate of forming are affected, too.
This is case with bone marrow cells, so, the chemotherapy patients, usually, have lower number of infection fighting white blood cells, low red blood cells (anemia, feeling tired, short of breath, dizzy), and low number of platelets, leading to blood cloting process dysfunction.
Due to low white cells count, your mother is vulnerable to infections, as her case of lungs infection (pneumonia).
The fewer white cells she has and the longer she remains with not enough white cells, the risk for even life-threatening infections is bigger.
Her oncologist can delay her treatment or lower her dose of chemotherapy drugs until her blood count is corrected.
I hope she is hospitalized for treating this infection.