The correct option is
C If I had had some money with me, I would have got a taxi.
On transforming the given sentence, it will become a third conditional sentence.
Third conditional sentences are used to explain that present
circumstances would be different if something different had happened in
the past.
When using the third conditional, we use the past perfect
(i.e., had + past participle) in the if-clause. The modal auxiliary
(would, could, should, etc.) + have + past participle in the main clause
expresses the theoretical situation that could have happened.
Thus after transformation, the sentence must be,
If I had had some money with me, I would have got a taxi.
Thus option C is the correct answer.
Options A,B,D are incorrect as they do not follow the rules.