1。 monopoly situation
you need to write down Q=P*X
take the first order derivative with respect to P
solve your first order condition , then you will get your P and subsitute P into your demand function
complete competition
Just list a linear equation system
X=50-0.5*P
X=P
you will find the equilibrium price and quantity