Genuine question
Edit: change the title from “Why can Socialist Market Economy be categorized as socialism, and why is NEP categorized as state capitalism?” to “Why can Socialist Market Economy be categorized as socialism meanwhile NEP is categorized as state capitalism?”
These are not mutually exclusive and could be used interchangeably.
“State capitalism” means that the state, under a dictatorship of the proletariat, holds all the political power not the capitalist class. Both the USSR during the NEP, and China now, can be called state capitalism. Both can also be called socialist because the state directs the economy towards the development of production through a market system.