I'm trying to solve $p\equiv a\pmod{7}$ and $p\equiv b\pmod{4}$
$m_1=(4)^{-1} \pmod 7$
$m_2=(7)^{-1} \pmod 4$
I need to find $m_1'$ and $m_2'$ which I assumed to be the inverse of $m_1$ and $m_2$
Thus $4m_1\equiv 1 \pmod 7 \Rightarrow m_1'=2 $ and
$7m_2\equiv 1 \pmod 4 \Rightarrow m_2'=3 $
Putting everything together I get:
$a\times m_1'\times 4 + b\times m_2' \times 7 \pmod {28}$
$8a + 21b \pmod{28}$
Is it correct?