here's how i'd do it (error checking left out to make it easy to read)
#include <array.au3>
#include <file.au3>
#include <MsgBoxConstants.au3>
Global $arrA, $arrB
Global $SearchTerm = "Stones"
_FileReadToArray(@ScriptDir & "\FileA.txt",$arrA, $FRTA_NOCOUNT,",")
_FileReadToArray(@ScriptDir & "\FileB.txt",$arrB, $FRTA_NOCOUNT,",")
msgbox(1,"RESULT","Value of " & $SearchTerm & " is " & GetValue($SearchTerm))
Func GetValue($SearchTerm)
$indexB = _ArraySearch($arrB,$SearchTerm)
if ($indexB <> -1) Then return $arrB[$indexB][1]
$indexA = _ArraySearch($arrA,$SearchTerm)
if ($indexA <> -1) Then return $arrA[$indexA][1]
EndFunc