to start i dont know much about cars)

welll my 95 nissan maxima and its leaked all of its transmission fluid and i looked underneath and there was a crack from where it was leaking so iam assuming its the pan, so my question is how could i fix that and what would it cost? please and thank you