That's a hard one, just don't go with older AMD cpu's.
I have a build but its slightly above 300$:
i3-6100(110$)
rx 460(120$)
h110 motherboard(50$)
8gb ram(60$)
1tb hdd(50$)
any case is more than enough so even 30$ is good
do you want a legal copy of windows? (30$ through the proper channels) or get linux(its great and runs buttery smooth) its free.
Can you get other parts from others unused pc? like dvd drives, the case, maybe the hdd.