4. Since the height $S H$ of the pyramid is seen from vertices $A$ and $C$ at the same angle, point $H$ lies on the median (which is also the bisector and altitude) $B M$ of triangle $A B C$ or its extension. If $S H=h, A B=B C=a$, $A C=b$ and $\angle S A H=\angle S C H=\alpha$, and the desired angle $\angle S B H=\beta$, then we have

$$
B H=h \operatorname{ctg} \beta=B M \pm M H=\sqrt{a^{2}-\frac{b^{2}}{4}} \pm \sqrt{h^{2} \operatorname{ctg}^{2} \alpha-\frac{b^{2}}{4}}
$$

from which, substituting the given data, we get $\operatorname{ctg} \beta=\sqrt{2} \pm 1$, depending on whether point $H$ lies inside or outside triangle $A B C$. Therefore, $\beta=\frac{\pi}{8}$ or $\beta=\frac{3 \pi}{8}$.
Answer: $\frac{\pi}{8}$ or $\frac{3 \pi}{8}$. Answer to the variant: $5-2: \frac{\pi}{12}$ or $\frac{5 \pi}{12}$.