If you mean dual boot? It may work, but in order to that you have to make sure you have CSM enabled in the bios.
Install Windows XP first.
If you install Windows 10 make sure it comes from a source that is not prepared for a GUID Partition Table setting.
Ram will be an issue, because Windows XP x64 is troublesome with drivers and the x86 version does not support more than 3GB of ram. Windows 10 can work with 3GB of ram, but if you do so make sure you got at least an SSD.
What do you mean "work"?
Do Windows XP programs work under W10? Probably. Some do and some don't. Some run without a single problem, whereas with others, you almost have to re-write the program to even get it to start.
Update your question with more details and clear information.
Windows 10 is the latest version of the Windows operating system. XP is no longer supported, it's vastly out of date. So what do you mean by "work with"? If your computer is running XP it is unlikely to be able to support Windows 10, which means you will need a new computer.
If you are running XP…..then 10 may not work at all for you.
Consider a Linux…..
If you would post your computer specs….and, what you are trying to do- then someone might be able to help.
There is no "Work with" , it is one or the other only
in what way?