Identification of switching costs from price shocks
This is not a complete argument but I'm going to give a brief sketch. Assume that producers set prices instead of quantity (which seems to be the model above). Assume that cost shocks do not affect demand, in other words $q(P,C,S) = q(P,S)$, and that they are not correlated with some kind of variation in switching costs. For simplicity, imagine also that this is a constant cost model. Then:

$$\frac{d q^\star}{d C}= \frac{\delta q}{\delta P}\frac{d P^\star}{d C}$$

Assuming switching costs are such that $\frac{\delta q}{\delta P}$ is low for high switching costs, this could give you an idea. If you enough form for $q$ you should be able to pin down $S$ using just-identified GMM (1 moment, 1 parameter). 

Let's take a more concrete example, using a more concrete problem. Assume a two period model. In the first period, prices are announced, in the second period there is a surprise shock to the costs of $B$ (WLOG they get cheaper) which $A$ does not experience. This causes a switch from $P_B$ to $P_B^\prime$. Suppose a continuum of consumers, $i$, each with a time invariant valuation of each good, $j$, $V_i^j$, jointly distributed according to $F$. Then people who switch to $B$ from $A$ this period are those individuals for whom:

$$U(V^B_i - P_B^\prime -S)&gt; U(V^A_i - P_A)$$
but:
$$U(V^B_i - P_A - S)&lt; U(V_i^A-P_A)$$
This means:
$$q^\prime - q = \int_V1_{U(V^B - P_B^\prime - S)&gt; U(V^A-P_A) &gt;U(V^B - P_A - S)}dF(V^A,V^B)$$
Note that this is basically analogous to the argument above using derivatives. With form on $V$ and $U$ estimation is straightforward. 

More complicated setups, (for instance, consumers with infinite horizons) will require more complicated arguments, but the basic identification will be the same. In this setting what you really need are forms for demand and not costs. As far as demand goes, with only this data you are restricted in what you can estimate. With linear utility, and one of the goods valuations normalized to 0, you could probably pin down the mean of $V_i^j$, and maybe a bit of its cross-sectional distribution. More detail would be possible with consumer level data.