How to calculate a specific time complexity of inverse calculation of matrix?
If you need complexity of this calculation in big O notation - it is: $$O(n^3)$$
Why? Because matrix inverse needs $$O(n^3)$$ operations, and it is biggest complexity here.

Multiplication matrix by its transpose is $$O(n^2p)$$ (Because for computing every value in the resulting matrix of size NxN you have to compute p multiplications).
Matrix transpose is $$O(np)$$ But you can ignore any complexities lesser than $$O(n^3)$$ (like matrix sum, transpose, or multiplying by constant) because their order of growth much lesser than order of growth of inverse operation.

Computational_complexity_of_mathematical_operations