Both prayer and fasting are commands of Allah. Every Muslim is responsible for both. Not performing one of these, does not require skipping the other, as long as he/she does not deny or ridicule. The Glorified Allah would award people for the performed prayers and punish for the non-performed ones. The person who does not perform the prayers is commiting a great sin but this does not hinder him/her from fasting. That person is still responsible for fasting.
People whose worldly deeds will be wasted are concealers, not Muslims. Verses on this subject are as follows:
“Say: “Shall We tell you who will be the greatest losers in respect of their works in the hereafter?
It is those whose effort in the life of the world will go astray and who believe nevertheless that they are doing good.
Those are the ones who refused to believe in the signs of their Lord and that they are bound to meet Him. Hence, all their deeds have come to naught, and We shall assign no scale to them on the Day of Rising, since they have nothing left to weigh.
Hell is their recompense for concealing the truth and ridiculing My signs and My Messengers.””
(Al-Kahf/The Cave 18:103-106)