Question: Lately I've started learning some basic music theory and I have been trying to rationalize some of the interesting chords I have heard of from famous pieces. Here is an example of which I am not sure if my understanding is correct.

Below are bar 11-12 from Mozart's Piano Sonata No.11 in A major, K.331. I have marked the chords using Roman numeral notations.

[![score](https://i.stack.imgur.com/Px8LY.png)](https://i.stack.imgur.com/Px8LY.png)

The blue text shows a naive marking. To me the ♯iv° chord gives a warm and sweet shifting feeling. I found that if I think of it as an applied chord (by tonicizing V) then the last three chords becomes a (vii° - IV - I) progression. If this is the case I was wondering how come the IV chord, as a pre-dominant chord, appears *after* the dominant chord vii° instead of before it? Why would the progression still sound inevitable when the strong dominant -> tonic progression is broken? 

---

Per @Dekkadeci's answer I revised the analysis as follows. The final three-chord progression simultaneously resolves two tension (cadential I chord to V, and on the V scale, dominant vii° to tonic I.

[![score2](https://i.stack.imgur.com/mf2pZ.png)](https://i.stack.imgur.com/mf2pZ.png)

Answer: 
You ask how to rationalise the progression. Here's how. It's a bare-bones B7, the dominant of the following chord, E, to which it resolves, delayed by a suspension. There's no room for all the notes of B7 in 3-part texture, but that's no reason to analyse it as something unnecessarily complicated.
The second chord could easily be the leading tone chord with the E functioning like an escape tone. That big jump up and the step down is typical of an escape tone.

The d sharp that resolves to an e in bar two gives the very real impression of a leading tone resolving, Im thinking E major. The notes in the top two voices of the last beat just look like suspensions from the previous beat