Update doc/cookbook: use $HOMEBREW_PREFIX

Use $HOMEBREW_PREFIX instead of `/usr/local` when talking about
formula file path.

Closes #34568.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>