Help with Supply and Demand Function equilibrium, restrictions

help please!

Consider the following market demand and supply functions:

D(p)= {30-2p p> or = 10

{50-ap p< 10

S(p)= -10+3p

a)If a = 2, find the excess demand function z(p). Find equilibrium price and quantity for this market. Or, explain why you cannot find them. What would one observe in this market?

b) What restriction must we impose on parameter a to ensure that a positive equilibrium price exists? Find the equilibrium price and quantity.

c) Suppose the intercept for supply curve S(p) could vary, so that supply curve becomes S(p) = b + 3p, and the demand curve remains at what was found in part (b). What restriction must we impose on b to ensure that equilibrium with a positive price and a positive quantity exists?