rw [mul_comm, ←one_mul (2^p)] at hfac
m n q p : ℕ
h₁ : p ≤ m
h₂ : q ≤ n
hfac : 2 ^ m * 3 ^ (n - q) = 2 ^ p
hdvd3 : 3 ^ q ∣ 2 ^ m * 3 ^ n
⊢ m = p ∧ n = q
m n q p : ℕ
h₁ : p ≤ m
h₂ : q ≤ n
hfac : 3 ^ (n - q) * 2 ^ m = 1 * 2 ^ p
hdvd3 : 3 ^ q ∣ 2 ^ m * 3 ^ n
⊢ m = p ∧ n = q