Dmitry, from reading your to3d commands (but not knowing what you entered in the graphical dialogue or what your scan parameters were), I think your problem is probably in the construction of the brick files. If you provide the proper dimensions and orientation to to3d, functional and anatomical volumes acquired in the same session should overlap fairly well without any additional effort (unless your participant moved). The Talairach transformation has nothing to do with aligning functional and anatomical volumes, so the images you attached are normal behaviour.
I gather from the .raw suffix on your functional image files that you start off with headerless image files. You need to be careful with such files because to3d cannot guess the position, dimensions, and orientation from the files, so it starts off with some default values. Double check the position, dimensions, and orientation agains the actual scan parameters. The top portion of the output from 3dinfo ("3dinfo func+orig") is useful for checking this.
For your anatomical, you might want to drop the use of 3D... file specifiers for your DICOM files because, strictly speaking, image data can be anywhere in a DICOM file--it may be better to let to3d figure out where. If you omit the 3D... specifiers, to3d will try to set the position, dimensions, and orientation for you automatically from the DICOM headers (but you can override this if necessary).
See "Where do AFNI Datasets Come From?" at [
afni.nimh.nih.gov]
for a tutorial, and the to3d help for more details of the command line usage (specifically, the -xFOV, -yFOV, -zSLAB, and related options). Please post more details if you still can't get it working.