I cant see if it is a replaceable dreailleur dropout. but in the first pic, It looks like the derailleur dropout is bent and starting to crack. if it is replaceable, get a new one, and your derailleur might be ok. (if it looks bent on the new dropout then it is not ok)
if it is not a replaceable dropout, the frame is aluminum and those are cracks in it and not just paint cracks. you might be able to straighten it ONCE. do not bend it back and forth. aluminum is very weak and it will snap.
If it is a steel fram just bend the dropout back straight. (get a bike shop to do it with a proper tool preferably) replace the derailleur if needed, no problemo.