Q:

What will become of the two cubesats deployed as part of the Insight mission?

So as part of the Insight mission, two Cubesats were also launched to relay data during landing (so data can be obtained if something goes wrong)

What becomes of these satellites once their primary mission is done?

A:

MarCO's primary mission isn't actually to transmit data from InSight during its entry period. That's a non-essentially function that can be done by other spacecraft, if needed. Instead, the main part of the MarCO mission is determining the functionality of cubesats during deep space missions. We've never before sent such small spacecraft this far from Earth, and the satellites are really mostly a testbed for future cubesat missions.
In terms of their orbital trajectory - well, Emily Lakdawalla wrote about this back in March:

With no ability to enter orbit at Mars, the MarCO spacecraft will shoot on past, remaining in solar orbit. I assume their Earth controllers will remain in contact for as long as possible.

As I understand it, "as long as possible" is hopefully in the area of a few weeks.

A:

Not an answer, but comments can't have pictures.
After the primary mission of supporting the InSight landing, one of the MarCO sats did snap a nice picture of Mars while departing:

A:

Both MarCO cubesats are flying by Mars -- not in orbit.  Furthermore, during their radio coverage of InSight's entry/descent/landing, their solar arrays are pointed away from the sun, towards Mars.  They are on battery power, and will eventually stop transmitting when the batteries die.  Then they will continue passively around the sun.

