Analytically solvable models are benchmarks in studies of phase transitions and pattern-forming bifurcations. Such models are known for phase transitions of the second kind in uniform media, but not for localized states (solitons), as integrable equations which produce solitons do not admit intrinsic transitions in them. We introduce a solvable model for symmetry-breaking phase transitions of both the first and second kinds (alias sub- and supercritical bifurcations) for solitons pinned to a combined linear-nonlinear double-well potential, represented by a symmetric pair of delta-functions. Both self-focusing and defocusing signs of the nonlinearity are considered. In the former case, exact solutions are produced for symmetric and asymmetric solitons. The solutions explicitly demonstrate a switch between the symmetry-breaking transitions of the first and second kinds (i.e., sub- and supercritical bifurcations, respectively). In the self-defocusing model, the solution demonstrates the transition of the second kind which breaks antisymmetry of the first excited state.