Of course competition would force them both to lower prices after they cut costs, but this will lead to increased demand so both companies should be making more profit. Also if they have a third competitior then they will both be gaining customers from them.
EDIT: Actually this happens all the time, just mediated by money. My economist brain switched off for a second. I was imagining a situation like "You tell us that trade secret in exchange for this one". But this situtation would require a "coincidence of wants". Money alleviates that problem. So this does happen all the time, it just looks more like "Even though you're our competitors we'll give you secret X in exchange for $n".