During wajib prayers if ayat sajda comes in second rakaa and by mistake i prayed qunoot before the sajda, imy namazvalid?

Yes namaz if ok but But you should have prostrated right away