Find the last position in a matrix walking like a spiral
MATL, 24 bytes
This works in release 16.0.0 of the language, which predates the challenge.
2^Q6Y3GYLG2\?!P!}P]-=2#f

Output is 1-based, as in the examples.
A^2 and N are limited to 2^53 as per the language's default data type (double). In addition, since the whole matrix is being generated, memory will limit A to significantly lower values.
Try it online! (In the online version I have changed the order of G and 6Y3 so it works in the new 16.1.0 release)
Explanation
This uses MATL's builtin for generating an outward spiral. To make it inward, a subtraction and a reversal are needed. The direction of reversal depends on whether A is odd or even.
2^Q     % take input A implicitly. Compute A^2+1
6Y3GYL  % outward spiral of side length A
G2\     % is A odd?
?       % if so
  !P!   %   flip matrix horizontally
}       % else
  P     %   flip matrix vertically
]       % end if
-       % compute A^2+1 minus the matrix element-wise, so (1,1) contains 1
=       % take input N implicitly. Set matrix entry that contains that value to true
2#f     % row and column index of that true value