Another response from one of our STATA experts, Tom Pullum:
If you look at hhid in BFWI31FL.dta and compare it with caseid in BFBR31FL.dta, you will see that hhid matches the first 12 (out of 15) characters in caseid. (The last 3 characters in caseid are a blank and the mother's line number). The following lines will do the merge if you change the paths to the data files. I am using an old version of the merge command, which I prefer.
use e:\DHS\DHS_data\BR_files\BFBR31FL.dta, clear
gen hhid=substr(caseid,1,12)
sort hhid
save e:\DHS\DHS_data\scratch\temp.dta, replace
use e:\DHS\DHS_data\WI_files\BFWI31FL.dta, clear
rename whhid hhid
sort hhid
merge hhid using e:\DHS\DHS_data\scratch\temp.dta
tab _merge
keep if _merge==3
drop _merge