how do we know getelementId is under ActiveUIDocument and getelement is under CurrentDBDocument

how do we know getelementId is under ActiveUIDocument and getelement is under CurrentDBDocument

I would say be searching the Revit API for the method you want (I guess ?) 