Zooming in on your picture indicates that the counter is made of particle board (or MDF) not plywood (which is fairly common). Unfortunately, particle board/MDF isn't particularly good at holding screws, so for any repair you do, make sure you get screws that are specifically designed for particle board (they have a coarser thread - fewer TPI - and deeper flutes to grab onto more material) to help make the repair last longer.
I would run a piece of plywood from the back of the cabinet to the front, directly underneath each of the gaps.
- Use 1/4" or 1/2" (~6 or ~12mm) plywood. Something as thick as you can without interfering with anything underneath, like the drawer or cook top mounting brackets.
- Make sure that your screws are longer than the plywood is thick, but shorter than the plywood and counter top combined.
- You do NOT want the screws to pierce the surface or you'll be making more repairs!
- You want the screw to go through 1/2 to 2/3 the thickness of the counter top material to ensure that it's got a good grip.
- Applying some wood glue (any brand of PVA glue available at the store will be just fine) to the top of the plywood where it will contact the counter top will help significantly with the strength of this joint.
- Once the glue dries, you could remove the screws and it would be just fine, but leave them in, no sense tempting fate.
For the left gap (where the controls for the old cook top were)
- Screw up through the plywood into the bottom of the counter top. Put a few screws in each edge, all the way around.
- Cut and fit your spare MDF to fill the gaps in the counter tops.
- Apply glue to the top of the plywood
- drop the MDF in
- screw in in from below.
- Have a friend/housemate lean down on the filler strip to hold it in place while installing the screws from below, otherwise the screw will push the MDF up instead of biting into it.
- If you don't have help handy, put a large, heavy pot filled with water on top of the filler strip to act as a clamp.
For the right gap under the cook top
- Pull the cook top back out.
- Cut the plywood as wide as you can to cover the hole (you want plywood to the left of the visible edge of the hole) AND to run under the cook top. You want to support that edge of the cook top!
- Make sure the plywood isn't interfering with any parts of the cook top - you'll probably need the top in place to make some measurements.
- Cut your spare MDF to fill the gap from the left edge of the hole to then go under the cook top as far as possible to support the mounting flange of the top.
- Mount the plywood under the cabinet with screws along the back, the front and the left edge of the plywood. The right edge, under the cook top will have to float because you don't want to try to run screws through the wood and into the cook top. _Make sure you use some glue to help support this.
- You'll probably need the cook top in place to make sure your plywood is placed correctly to not interfere later.
- With the cook top back out, put the MDF in, tight to the left edge.
- Do a test fit of the cook top, just to be sure!
- Once you know the cook top will fit around your MDF patch, pull it out again
- Apply glue and screw down the MDF.
Once you're done with all this. Sit back and have a beverage, you've done some hard work! However, you're not done!
You'll need some sort of filler material to fill in the gaps in the laminate top. It's very unlikely that you'll have cut your filler strips so precisely that there won't be any gap at all. Plus, that melamine laminate tends to chip when you cut it.
Once the filler has dried, scuff sand the entire counter top (some 220 grit sandpaper should do the trick) - the goal it to just dull the surface, giving the laminate some "tooth" so the paint will have something to hold on to. Paint the counter top with whatever paint you desire. Make sure to talk to the paint shop to ensure that your paint choice is appropriate for painting laminate.
Be prepared to repaint every few years - it's likely that the paint will wear off a high use surface like a counter top.
OR...
Replace the whole counter top. It will be more expensive, but the final result and long-term satisfaction will probably more than make up for the expense.