\documentclass[a4paper]{book}
\usepackage{mathtools}
\usepackage[top=3cm, bottom=3cm, left=4cm, right=4cm]{geometry}
\usepackage{amsthm}
\usepackage[titletoc,title]{appendix}
\usepackage[linkcolor=red,colorlinks]{hyperref}
\usepackage{fancyhdr}
\usepackage{lipsum}
\usepackage{xepersian}

\fancyhead[RE,LO]{\bfseries\thepage}
\fancyhead[CE]{\leftmark}
\fancyhead[CO]{\rightmark}
\cfoot{}
\pagestyle{fancy}

\theoremstyle{Plain}
\newtheorem{theorem}[section]{قضیه}

\setlatintextfont[Scale=1]{Times New Roman}
\setdigitfont[Scale=1]{XB VNiloofar}
\defpersianfont\chapfont[Scale=3.3]{XB VNiloofar}
\settextfont[Scale=1.3]{XB VNiloofar}

\numberwithin{equation}{chapter}

\begin{document}
\chapter{احتمال}
\section{حرکت براونی}
\begin{theorem}\label{th1.2}
\begin{equation}
x^{2}+y^{2}=z^{2}
\end{equation}
\end{theorem}

\section{
مفاهیم مرتبط با قضیۀ \ref{th1.2}
}
\lipsum

%\end{appendices}
\end{document}