Reorder a matrix, twice
MATL, 15 13 bytes

t3$)&amp;Gw&amp;St3$)


Inputs u,  then A.

Outputs B, then C without a separator, as there is no ambiguity.

Try it online!

Explanation

t     % Take input u implicitly. Duplicate u
3$)   % Take input A implicitly. Index A with u as row and column indices
&amp;G    % Push the two inputs again: u, A
w     % Swap
&amp;S    % Push indices that would make u sorted. Call that v
t     % Duplicate v
3$)   % Index A with v as row as column indices. Display implcitly