Let $R$ be a commutative ring, $\mathfrak{m}\subset R$ a maximal ideal and $f$ a monic polynomial in $R[x]$. I want to show that $A:=\frac{R[x]}{\mathfrak{m}[x]+(f)}$ is a semilocal ring, where $(f)$ means the ideal generated by $f$.
One step towards the solution might be to show that $A\cong \frac{(R/\mathfrak{m})[x]}{(\overline{f})}$, where $\overline f$ means $f$ modulo ($\mathfrak{m}[x]+(f))$.
Then as $R/\mathfrak{m}$ is a field, $(R/\mathfrak{m})[x]$ is a PID and thus we have a PID modulo a nonzero ideal...
As I can't show the isomorphism nor the actual claim I am greatful for every answer, hint or advise!
Sure, you are looking at $$\frac{R[x]}{\mathfrak{m}[x]+(f)}\cong \frac{\frac{R[x]}{\mathfrak{m}[x]}}{\frac{\mathfrak{m}[x]+(f)}{\mathfrak{m}[x]}}=\frac{(R/\mathfrak{m})[x]}{(\overline{f})}$$ where $\overline{f}$ is the polynomial coefficients mod $\mathfrak m$.
As you noted, the last ring is a quotient of a PID, and so the complete list of ideals containing $(\overline{f})$ is furnished by the divisors of $\overline{f}$, of which there are only finitely many.