I Integration Limits Changing in Double Integral Order Change

For part of a proof of a differential equations equivalence, we needed to use that $$\int_0^t [\int_0^s g(\tau,\phi(\tau))\space d\tau]\space ds = \int_0^t [\int_\tau^t ds]\space g(\tau,\phi(\tau))\space d\tau$$

I understand that the order is being changed to integrate with respect to s first instead of tau, however I don't understand whats happening with the limits of integration. It has something to do with changing the order of integration but I can't follow it if someone could help show the steps between that equality.

I understand how the domain would be $${(s,\tau):0<\tau<s, 0<s<t}$$ but I don't see how and the second relation is true given the first. However, I don't see how we can just change the limits of integration like that since they are completely sections of a curve.

The domain of integration of the integral on the left is those points of the [itex](s, \tau)[/itex] plane for which [itex]0 < s < t[/itex] and [itex]0 < \tau < s[/itex]. That's the triangle with corners (0,0), (t,0), and (t,t).

The domain of integration of the integral the right is those points of the [itex](s, \tau)[/itex] plane for which [itex]0 < \tau < t[/itex] and [itex]\tau < s < t[/itex]. That's the triangle with corners (0,0), (t,0) and (t,t).

The domain of integration of the integral on the left is those points of the [itex](s, \tau)[/itex] plane for which [itex]0 < s < t[/itex] and [itex]0 < \tau < s[/itex]. That's the triangle with corners (0,0), (t,0), and (t,t).

The domain of integration of the integral the right is those points of the [itex](s, \tau)[/itex] plane for which [itex]0 < \tau < t[/itex] and [itex]\tau < s < t[/itex]. That's the triangle with corners (0,0), (t,0) and (t,t).

These are exactly the same subset of the [itex](s,\tau)[/itex] plane.

That's all there is to it.

Okay I can see that they're the same area now so it makes sense that the integrals would be equivalent, thank you. Now is the reason the bounds have to be changed, that the integration can't be switched with the original bounds since the inner integral is a function of s, so in order to reorder the integrals the bounds have to be changed to make the inner function no longer on of s?