Hi Thanks for your query.
Your child is having fever
which is mostly viral in nature and settles in few days with symptomatic management.
are both antipyretics and are totally safe when taken in proper dosages.
Your doctor is right you can give both alternatively.
Monitor temperature every 4 to 6 hourly and give antipyretic when fever is above 100F.
Do tepid sponging if fever is above 102 F.
Give plenty of fluids in form of glucose
water,fruit juices.vegetable soup ,coconut water and soft
bland diet so as to maintain nutrition and hydration.
In case fever persist get re evaluated by doctor to look for any focus of infection and treat accordingly.
Wishing your child good health.