There is not a standard way to extract a base (or subbase) for a given topology. In fact often the direction is the other way around: a topology is first introduced by giving a base for it (like in the case of metric spaces, where the open balls form a standard base, or for ordered spaces, where the sets $U(a) = \{ x \in X \mid x > a \}$ and $L(a) = \{ x \in X \mid x < a \}$ for $a \in X$ form a subbase).
By definition, the topology generated by a subbase or base is the smallest topology on the set that contains that subbase or base. This is a uniquely defined topology (it's the intersection of all topologies that contain it, and the discrete topology is always one of those) so equal (sub)bases give equal topologies.
As mentioned, a given topology in general will have many different bases or subbases that generate it. The open balls (metric base) vs. open rectangles (product topology base) for the plane are classical examples of that, but there are more trivial ones as well (the topology itself is a base for itself, and if $X$ is $T_1$, so is the topology minus $X$ itself, e.g.)