To start with, such two orbits are extremely unlikely. First of all, any object orbiting a star and deviating strongly from a circular orbit has a high risk of crashing into something. As you notice, there are very few planets in our solar system, and all of them except Pluto have a very regular orbit. Planets which have intercrossing orbits would have crashed into each other and fallen apart on the planetesimal stage, much earlier than becoming a planet.
Then, if you suppose that such an event does occur, the consequences will depend on multiple factors. For one, the composition of the planets - if the two planets are terrestrial (rocky), one would expect them to fragmentate and lose a large amount of their mass. Their cores would maybe fuse into one planet, and the debris would form one or several satellites. The exact outcome would be dependent on their speed, their density, and the angle of their collisions. A similar (but not the same) scenario happened during the late stage of Earth formation, when an object close to Earth's size crashed into it to create the Moon. If the sizes are the same and the formation is complete, chances are that most of the matter would fly away and the planet that would be left would be tiny.
It would be a different story if the two planets are gaseous. They have almost no solid matter in them, so chances are that the planets will fuse whilst losing (proportionally) significantly less matter than terrestrial planets. Still, there would be losses.
Lastly, if a terrestrial and a gaseous planet meet, the outcome is quite easy to predict. Gas planets are much larger than rocky planets, so the rocky planet would simply be engulfed. It will maybe cause a disturbance on the surface of the gas giant.
To wrap it up let me just note that such a collision would almost definitely change the orbit of whatever is left, so that it would either get pushed into the sun or away from it, causing it to float eternally in outer space. Have a nice day.