Against heavy tanks like P.E.K.K.A or Giant, the Inferno Tower is your best friend. Place it centrally to melt them down. Support it with smaller troops to deal with any accompanying units. For the Hog Rider, defensive buildings like the Cannon or Tesla are excellent for pulling it. You can also use high-damage troops like Barbarians or a Mini P.E.K.K.A (unlocked later) to quickly eliminate it before it deals too much damage to your tower. Timing is everything.
