You're on the right track, however, what exactly isn't working? Does it crash, silently fail, etc?
- I'm not sure if it's possible to use D3D11_BIND_SHADER_RESOURCE flag with D3D11_USAGE_STAGING, try to set bind flags to 0.
- You have different number of mip levels, it might be unable to copy data because of that (I've failed to find info on MSDN).
- 400x400 texture isn't power of 2, therefore it's most likely bigger than (td.Width * td.Height), use D3D11_MAPPED_SUBRESOURCE::RowPitch value for "width".