Fida
As I said in my Discussion point (to your question), this feels liike a school problem so I'll give you a clue rather than solve it for you...
I suggest you follow this tutorial Best Lookup Formula in Excel - Index and Match- that approach can be used to solve point 1 of the question but it can be tricky to follow the tutorail- you need to read very carefully.
Good luck