I'm given a function

and I'm asked to show every function

is measurable relative to

iff

which is measurable relative to

and

. One direction is trivial since the composition of measurable functions is measurable. Intuitively it makes sense as well, but I'm a little stuck on the other.
I know by definition

measurable in the sense indicated means

such that

.
And I feel it must only be a hop, skip, and a jump away from actually defining an

with this relation since point fibers partition off the domain,

, however I cannot quite see how to do it, so I think perhaps there is something sneakier I can do, such as letting

be the family of all

such that the condition holds and somehow show it must be everything by appealing to some property of

or

, but I cannot see how to quite work this one.
Partial construction (?):
Consider the partition of

formed by

where I throw out empty sets as irrelevant. Then

such that

, and because fibers commute with unions, we have:

, then I somehow get a partition of

by doing this for all points

and disjointifying the

by taking sufficient complements (which is fine, since we have a

-algebra) and somehow producing

from this by demanding

or even just

for some choice of

which must be nonempty if

is. The axiom of choice should ensure that this works. Does this function as a workable argument? It feels a bit ad-hoc, but who knows. Any help appreciated.