(a) If the court in this state has jurisdiction under section 83.17 of this article, it may proceed with the case unless a court in another state acquires jurisdiction under provisions similar to such section before the appointment or issuance of the order.
(b) If the court in this state does not have jurisdiction under section 83.17 of this article, whether at the time the petition is filed or at any time before the appointment or issuance of the order, the court shall stay the proceeding and communicate with the court in the other state. If the court in the other state has jurisdiction, the court in this state shall dismiss the petition unless the court in the other state determines that the court in this state is a more appropriate forum.