I'm not following this at all. If supply is flat (not linear and certainly not linear with a slope of 10), then Cost(Q) = 10 (not 10Q) So in the first example P = 100-Q, the curves cross where 10=100-Q, so Q = 90 and P = 10. Second example they cross at, P=200-Q = 10 = Cost(Q), so Q=190 and P = 10 (more sales, same price)

In this case, the supply curve and MARGINAL cost are the same. Cost(Q)=10Q implies MC=10.

So in the first case, you would maximize Total Revenue-Total Cost= P*Q-C(Q)=(100-Q)Q-10Q.

Taking derivative with respect to Q, we get 100-2Q-10=0, resulting in Q=45. Plugging Q=45 back into the demand we get P=55.

I taught intermediate microtheory for 3 years at UNC-Chapel Hill, so for the sake of my former students, I hope I haven't f**ked this up.