in
so, it is simple math substitution:
substitute (3) in (2)
In more general form
in your particular example a=b=1, c=2 and d=5
that is why
y = x + 1
y is dependent variable and x is independent variable. In z = 2a + 5
z is dependent and a - independent variable. They use different notation to avoid confusion. It is same to write the second one as z = 2x + 5
so, it is simple math substitution:
y(x) = x +1 (1)
y(z) = z+1 (2)
z = 2x + 5 (3)
substitute (3) in (2)
y = (2x + 5) + 1 (4)
y = 2x + 6 (5)
In more general form
y = ax+b
z = cx+d
y(z) = a(cx+d) + b
y(z) = acx + ad + b
in your particular example a=b=1, c=2 and d=5
that is why
y(z) = 1*2*x + 1*5 + 1
y(z) = 2x + 6