I was trying to derive for A from the function: profit=PQ(P,A)-C(Q(A))-A

these are my steps

profit=Pdq/da-Cqdq/da-1

dprofit/dA=P(dq/da)-MC(dq/da)-1=0

(p-MC)change in q/change in A=1

p-mc/p[A/Q *change in q/change in A]=A

A=TR Ea/Ed
-----------
this is what is is suppose to equal after deriving i just wanted to know if my steps were correct, thanks!