Please advise how did you work the equations ?