The data your show us can't be GROUPed to give the solution you ask for, because there is no "common data" which combines rows 1 and 2 but not 3, or rows 1 and 3 but changes the name on 2.
You need to look at what you are trying to do a bit more closely: I'm pretty sure both your input and output data examples are wrong: shouldn't "Aaaa." be "Aaa." in the input and "Peter" be "Kevin" in the output?
If so, it's a simple GROUP BY and a JOIN to get the data you want.
Since it's clear you don't want to show us what you have tried, and equally clear that this is homework, I'm not going to give you the code.
Instead, I'll explain how to get the code you want.
Start by writing a SELECT using the GROUP BY:
SELECT ... fields ...
GROUP BY <grouping column>
YOur grouping column will obviously be PAN, and the fields will be the grouping column, the combined balance, the lowest customer number, and the number of rows in the group.
That's pretty trivial: test it and check you have the right results:
PAN Balance CustNo Count
Aaa. 100 1 2
BBB. 100 2 1
Then all you need is to use a JOIN to combine that with your original table to get the Name and you are done.
Simple - so give it a try, and show us what you ended up with.