Homomorphism defined by a function 
Let $f: \mathbb{Z}_{143} \to\mathbb Z_{11} \times\mathbb Z_{13}$ be an homomorphism
  and define $f$ by $f(x) = (x\mod11, x \mod13).$ Determine an $x\in
 \mathbb{Z}_{143}$ such that $f(x) = (7,4).$

I got that $x\mod 11 = 7$ and that $x\mod13=4$ so this implies $x = 7 + 11q$ and $x = 4 + 13r$ for some $q$ and $r$. Thus combining the two I got $4+13r = 7 + 11q$ therefore $3 = 13r - 11q.$ 
Here is where I got stuck (need to review number theory again and Euclid of Alexandria). 
How can I find my $q$ and $r$ and complete the problem? 
 A: In this kind of simultaneous congruences, the Chinese remainder theorem is your friend. But you must of course know a version that shows how to effectively get a solution.
To get a not too large answer for $x$, I suggest to put $y=x-4$ and solve for $y$ first; you are now given $y\equiv3\pmod{11}$ and $y\equiv0\pmod{13}$. So you need a multiple $13k$ of $13$ that gives remainder $3$ modulo $11$; since $13$ itself gives remainder $2$, you need to solve $2k\equiv3\pmod{11}$ which you can do almost at sight by $k=7$ (or $k=-4$). You get $y=91$ and $x=95$ (or $y=-52$ and $x=-48$).
In general you will after simplification need to solve a congrence of the type $ax=b\pmod{n}$ for some $a,b,n$ (here $(a,b,n)=(2,3,11)$). The systematic way to do this is to compute $d=\gcd(a,n)$ while finding (a Bezout coefficient) $s$ such that $d\equiv sa\pmod n$; now either $d$ divides $b$ and $x=(b/d)s$ is a solution, or $d$ does not divide $b$ and there will be no solution, since further reduction modulo$~d$ gives the impossible congruence $0x\equiv b\pmod d$.
A: Usually we calculate $gcd$ of $13,11$ as follows :
$13=1.11+2$
$11=5.2+1$
$2=2.1+0$
Now, as you know $(13,11)=1$ you are sure that there exists $m,n\in \mathbb{Z}$ such that $13m+11n=1$
Now, $1=11-5.2=11-5(13-11)=11+5.11-5.13=6.11-5.13$
If you have  $1=6.11-5.13$, can you find $r,q$ such that $3=13r-11q$??? 

 just by multiplying by 3 on both sides $3=18.11-15.13=13(-15)-11(-18)$

A: You want a solution to the system of congruences
$$\begin{align*}x&=7\pmod {11}\\
x&=4\pmod{13}\end{align*}$$
Mimic (one of) the Chinese Remainder Theorem's proofs: we want to find $\;t\in\Bbb Z\;$ s.t. $\;7+11t=4\pmod {13}\;$ since then $\;x:=7+11t\;$ solves our problem (why?):
$$11t=4-7=-3=10\pmod{13}\implies$$
$$\implies t=10\cdot 11^{-1}\pmod{13}=10\cdot 6=60=8\pmod{13}$$
So take $\;x=11\cdot 8+7=95\;\ldots$
