You just pull the DLL from another program and put it in the directory with the program. No need to reboot because they are not drivers. Some developers supply the DLLs simply, but Microsoft likes to make everything difficult. The bit architecture should match the program. If it is 32-bit, it can only ever load 32-bit dlls. The XAudio2* modules won't give any error if missing, but the game won't have sound. Those are shared and go in the system directory. Let the installer put them there if you are a new user.
Not a "random" file, but the correct one. d3dx9_42.dll only comes only in two flavors x86 and x64. Simple software like media players usually have this file included with it to avoid a need to install a full set of DirectX. Big games often miss the file because they want to comply with some Microsoft rules and don't want to allocate 0.05% of the disk space.