Do you know what the matter is? This one is correct.
'what the matter is' is the object of the verb 'know'. In a noun clause beginning with a question word, the subject precedes the verb. Do not use question word order in a noun clause.
"is it right to say this most people girls are prositute but alot are not"
The question is not clear. If you meant "right" from a grammatical point of view, then no, it isn't correct. The word "people" does not belong in that sentence. And, if "most" girls are prostitutes, then it does not make any sense to say that "a lot" are not. Afte