OK, here are a couple derivations that should help. First, for background, here is how a simple beam formula is derived using the differential equation for the elastic curve of a beam, which relates moment to curvature and material/shape properties:
That gives the well known deflection for a beam with simple supports and a point load in the middle.
Here's the same approach but for a beam that has a different area moment in the middle section. For convenience I assumed the beam is evenly spaced up in quarters, with the different section taking up the middle half.
I checked to make sure this more complex formula gave the simple result when the area moment was the same everywhere, and it does, which hopefully is a good check on my math. But it couldn't hurt to follow through and check my work. Really the hardest part of these derivations is not the Calculus, it's keeping track of all the math and fractions.
The basic gist of what I did in the second case was the same derivation, but breaking it down to apply to different sections of the beam. We can solve for unknown constants in the process by knowing deflection is zero at the end, that slope is zero in the middle at x=L/2, and that deflection and slope must be equal where the two different sections meet up at x=L/4. That lets us come up with equations for the whole beam.
Anyhow, using the result on page 4, you can plug in I1 (unstacked area moment) and I2 (stacked area moment) and get the deflection in the middle of the beam. Hope this helps!