I'd like to prove, following Terence Tao's Analysis I book, that the relation $R$ in the class of functions from $X$ to $Y$ given by $$f\mathrel{R}g \iff \textrm{ for every } x\in X, f(x)=g(x)$$ satisfies what Tao calls the "Axiom of Substitution", that is, if $f,g:X\to Y$ are functions and $f\mathrel{R} g$, then $h(f)=h(g)$, for every admissible function $h$.
I don't know, however, how to proceed, so I was wondering if someone could help me prove that. How does one prove that $h(f)=h(g)$ just knowing that $f(x)=g(x)$, for all $x\in X$?