A possible approach for this scenario is to use the functions available in the Symbolic toolbox to declare variables x,y,z and three functions which you can call with the specific integral limits. For example:
syms x y z % declare symbols
F = sin(x).^2;
G = int(F,x,0,y);
H = int(G^2,y,0,z);
subs(H,z,2)
The following documentation links explain these function in detail: