Cross-entropy via softmax: Mathematical derivation
Hints:

$P(Z|\theta)$ is independent of $\hat{y}$ so it can be left out as merely a multiplicative factor as we are interested in $\hat{y}$.
$\theta$ is a parameter and for each model is indeed fixed, it is not a variable