I have an outline for the proof, but would appreciate someone checking if the logic in Claim 1.1 is sound and I could use some help with Claim 2.1

For any topological space (E, ΤE) and any function f: E → (X1 x X2),
f: E → (X1 x X2) is continuous iff (g1 o f): E → X1 and (g2 o f): E → X2 are both continuous.

Proof:
Claim 1:
If f: E → (X1 x X2) is continuous, then (g1 o f): E → X1 and (g2 o f): E → X2 are both continuous.
Proof: Suppose f: E → (X1 x X2) is continuous.
Claim 1.1: (g1 o f): E → X1 is continuous
Suppose G∈Τ1 (ie: G is open in X1)
Then G∈ΤX1 x X2 [Is this notation ok for the topology associated with X1 x X2? Is this line true? Do we know Τ1 ⊆ ΤX1 x X2?]
Then f-1[G] ∈ΤE because f: E → (X1 x X2) is continuous
Then (g1 o f)-1[G] ∈ΤE (ie: (g1 o f) is open) [Do we know this from the above step?]
Hence, (g1 o f) is continuous
Similarly, we can show (g2 o f) is continuous

Claim 2: if (g1 o f): E → X1 and (g2 o f): E → X2 are both continuous, then f: E → (X1 x X2) is continuous.
Proof: Let (g1 o f): E → X1 and (g2 o f): E → X2 both be continuous
We know {(G1xG2)| G1∈Τ1 and G2∈Τ2 } is a base for ΤX1 x X2
Claim 2.1: If A∈B={(G1xG2)| G1∈Τ1 and G2∈Τ2 }, then f-1[A] is open in (E, ΤE)
Proof: Let A∈B
Then G1∈Τ1 (ie: G1 is open)
Then (g1of)-1[G1] ∈ΤE (ie: (g1of)-1[G1] is open) because g1of is continuous
[I'm stuck on how to reach the conclusion from here]
f-1[A] ∈ΤE (ie: f-1[A] is open in (E, ΤE))
Therefore, f: E → (X1 x X2) is continuous
Therefore, f: E → (X1 x X2) is continuous iff (g1 o f): E → X1 and (g2 o f): E → X2 are both continuous from Claims 1 and 2