Cournot game with 2 firms I have given


2 firms in a market with constant marginal costs and no fixed costs
market demand has $D(p)$ 
The ﬁrms play a Cournot game


I'm supposed to Calculate the equilibrium quantity for each ﬁrm and the market equilibrium quantity and price. Also I have to find the implied proﬁt for each ﬁrm.

My approach:


Isolate the profit functions as $\pi_i = F(q_A, q_B)$ for $i \in \{A, B\}$
Then I compute marginal costs using that MC = the derivative of total costs w.r.t. Q
Then use that MR = MC for each firm, and solve for $q_A, q_B$
Then using this I was able to find the equilibrium quantity for each firm by substituting one into the other
Finally I subbed these quantities into $D(p)$ to get the equilibrium price 


Among my results, I get that $q_A = q_B$. I'm not sure if I've solved this correctly but it seems to make sense to me that the firms have the same equilibrium quantities due to it being a Cournot game. 

Was the approach correct?
The approach is correct, but it is not true that firms have the same equilibrium production quantities because we are dealing with Cournot competition - it is because the firms have the same profit functions. You can see for yourself with an example that if the two firms had different cost functions, they would not necessarily produce the same outputs as each other.

The step of "substituting one into the other" implicitly uses the concept of Nash equilibrium, i.e. each firm's production quantity is a best response to the other's. Given that $A$ produces some amount $q_A$ and $B$ knows it, $B$ would make the amount $q_B^*$ is profit-maximizing for $B$. Then we fix $q_B^*$ and find what $A$ would make as a profit-maximizing response - call it $q_A^*$. If I then fix $q_A^*$ and find $B$'s profit-maximizing response is the same $q_B^*$, $(q_A^*,q_B^*)$ is a Nash equilibrium: each firm's action is optimal, given the other's. This line of reasoning can be implemented by a solving a system of two equations, given by the profit-maximizing condition $MR=MC$ for each firm that you mentioned.