Solution 1:

As was mentioned in comments by GEdgar, it can be derived from the basic properties obtained from both definitions (basic properties of the "unusually" defined integral could be found, for instance, in Bogachev-Smolyanov textbook). By standard convergence theorems (Lebesgue, Levi) the problem could be reduced to comparing integrals of functions taking finitely many values, which in turn reduce by linearity to the indicator functions of measurable sets and the latter case is obvious from the definition. I will give a direct proof though.

Denote by $I_1(f)$ the integral in the first definition and $I_2(f)$ the one in the second. Assume that $0\le f<\infty$ and $\mu(X)<\infty$. Take $y_{n,j}=j/n$ and $A_{n,j}=f^{-1}[j/n,(j+1)/n)$. Since $I_1(f)=\lim\limits_{n\to\infty}\lim\limits_{k\to\infty}\sum\limits_{j=0}^k y_{n,j}\mu(A_{n,j})$ and each $\sum\limits_{j=0}^k y_{n,j}I_{A_{n,j}}\le f$, it follows that $I_1(f)\le I_2(f)$.

To prove the reverse inequality, take $y_{n,j}=j/n$ and $A_{n,j}=f^{-1}((j-1)/n,j/n]$. Then, for every $s(x)=\sum_i s_i\mu(B_i)$ such that $s\le f$, we have $$ \sum s_i\mu(B_i)= \sum_{i,j} s_i\mu(B_i\cap A_{n,j})\le \sum_{i,j} y_{n,j}\mu(B_i\cap A_{n,j})\le \sum_{j} y_{n,j}\mu(A_{n,j})\to I_1(f). $$ Thus, since $s$ was arbitrary, $I_2(f)\le I_1(f)$.

If $X=\bigcup X_i$, $\mu(X_i)<\infty$, by definition $$ I_1(f)=\lim I_1(f I_{X_i})=\lim I_2(f I_{X_i})\le I_2(f). $$

For every simple function $s\le f$, $$ I_2(s)=I_1(s)=\lim I_1(s I_{X_i})\le\lim I_1(f I_{X_i})\le I_1(f), $$ so $I_2(f)\le I_1(f)$. The monotone property of $I_1$ and $I_2$ for positive functions can be seen directly from definitions.

Finally, if $\mu(f=\infty)>0$, both integrals can be checked to be infinite by choosing some approximating functions including $\infty\cdot I_{(f=\infty)}$ term. The case of signed/complex $f$ follows immediately, since they are defined using positive/negative parts.