Those are correct. However, I notice that in using chain rule for the second problem, you have

while using direct substitution, you get

Those are, of course, the same because and so that

but the second, with only the variable t is the better expression.