Really, there's a general rule to go by: when you see a mobile game ad, there are very good chances what is shown is not gameplay, or not even related to the game. Some of these mobile games (Homescapes) are even being sued for misleading advertising.
So yeah, except for the characters in the ad, nothing of what is shown exists in the 'Hero Wars' game.
Does the gameplay shown in the advertisement exist as an actual game?
I would expect no. The gameplay shown is a very easy puzzle, and they are banking on the dumb (but I guess working) trend in mobile advertising where the puzzle is basic, kindergarten math (usually shared with some sort of challenge like "98% OF THE POPULATION CAN'T DO THIS, CAN YOU?") Like the puzzle shown in this ad. Just pick your character, and then go and check every enemy. Is his level HIGHER? OR LOWER? If lower put against.
You might find a puzzle that looks like this in a puzzle compilation game, but a game that has this basic mechanic as it's only feature? Not that I know of.
EDIT: There is now also a GameTheory episode that digs down as to why those ads never seem to fit with what the game actually is.
EDIT: Years later, it seems someone DID make a game all about those mobile game ads if you wanna play them.