For an authentic cadence to be considered perfect, both of these chords need to be in root position, so on that count the links above are fine - both chords are in root position.

However, perfect cadences also need to have the tonic as the highest note of the tonic chord (I) - A major chord. As you can see from this link, the tonic chord notes are currently A, C#, and E.

At the moment, the highest note of the I chord is E, so to make this cadence perfect, we will add the octave of the tonic note into the chord. This is note 8 of the piano diagram in the above step, and as note 4 on the piano diagram below.

Example

The two chords above are shown as the last two chords on the treble clef below.

The first three chords on the staff below are not strictly part of the cadence, but they are useful to set the expectation that this phrase is definitely in the key of A major.