Let $G, H$ be groups. Let $G\rtimes _\phi H$ be a semidirect product. The product is twisted.
Let $BG$, $BH$, and $B(G\rtimes_\phi H)$ be the classifying spaces of $G$, $H$, and $G\rtimes _\phi H$.
What is the relation between cohomology algebras $H^*(BG), H^*(BH)$ and $H^*(B(G\rtimes_\phi H))$?
Does $BG\to B(G\rtimes_\phi H)\to BH$ or $BH\to B(G\rtimes_\phi H)\to BG$ form a fibration? I want to use Serre spectral sequence. Is it possible?
Yes, there's a fibration with fibre $BG$. And you don't need a semidirect product: any extension of groups will do.
The special case of the Serre spectral sequence that this gives is often called the Lyndon-Hochschild-Serre spectral sequence, and can be constructed algebraically.