This is a problem with many, many sources across the web (if you want to do a search its called "bounding box collision detection" / "bounding box overlap")
With more background on what you are trying to do (i.e. are you detecting your collisions in a grid like tic-tac-toe, or are you doing them in a continuous space?) we can debug your code.
I'm going to describe this as pseudocode; I don't know what language you're using. If you understand the concepts as I explain them, you should be able to write the code.
Create a list called "cars".
Every time a car is created at the edge of the screen, put that car into "cars" array.
Every time a car is deleted at the edge of the screen, remove that car from your "cars" array.
Keep a reference to your frog (you are already doing this, i.e. your variable called "frog")
frog.left = frog.x
frog.top = frog.y
frog.right = frog.x+frog.width
frog.bottom = frog.y+frog.height
For each car in cars
car.left = car.x
car.top = car.y
car.right = car.x+frog.width
car.bottom = car.y+frog.height
if ((car.left is between frog.left and frog.right) or (frog.left is between car.left and car.right))
horizontalOverlap = true
if ((car.top is between frog.top and frog.bottom) or (frog.top is between car.top and car.bottom))
verticalOverlap = true
if (horizontalOverlap and verticalOverlap)
explode frog
if lives == 0
end game
else
lives = lives - 1
place new frog back at start point (usually bottom of screen)
HTH. Draw your two boxes representing the current car and your frog, on a piece of paper, and you will see what is going on. The algorithm is checking overlap first along the x axis, then along the y axis. If there is overlap on both axes, then the car is on top of the frog (or vice versa), so the frog must explode.