Hi. They are both the same note. The fifth fret on the low E string is an A. In order, E F F# G G# A, then the next string is A A# B C C# D
Move this up to the fifth fret of the low E string, and you have A A# B C C#, then on the A string D D# E F F#.
It is easier to see this if you can find one of those nice fingerboard charts. If not, it always helps to draw it out yourself.
I always found it helpful to draw charts of all the different scales.
Maybe someone else who has some internet friendly charts could post them to expand on my explanations.