When someone says to you, "How do you do?", it does not mean "How are you?" It just means "Greetings".
The proper response to 'How do you do?' IS a reciprocal 'How do you do?', as in this exchange from Oscar Wilde's Lady Windermere's Fan, 1892:
Lord Darlington: How do you do, Lady Windermere?
Lady Windermere: How do you do, Lord Darlington?
The proper response is not "I am fine" or "How are you?"
Note that "How do you do?" is only used the first time you have ever met a person. Thereafter, you should use "How are you?" when you meet.