my assignment

I work out the solution and I don't know whether it is right or not.