Need help in solving these two problems

Have attached the answers for the same.