This question is in my practice midterm and it does not have solutions, I want to make sure my proof is correct.
Proof:
Suppose integers $a$ and $b$, and suppose $a$ is composite therefore we can write $a$ as the product of integers $r$ and $s$ where $1 < r < a$ and $1 < s < a$. since $a$ divides $b$, we can write that $rs$ divides $b$. therefore we can write $b = rsk$ where $k$ is an integer. so $b$ is written as a product of integers where one of them is not $1$ or $b$ so $b$ is composite.
Would this be correct?
It's good! You have exactly the right idea, and you've presented it reasonably well. I think there's one thing that could be expanded a little bit. When you say,
I think you could justify a little more completely why none of $r$, $s$, or $k$ is $1$ or $b$. Obviously $r$ and $s$ are not $1$, by assumption, but why couldn't $k$ be $1$? Why couldn't $k$ be $b$? Also, couldn't $r$ and/or $s$ be $b$?
Of course, none of the above possibilities are possible, and it's not hard to justify this. For example, if we had $r = b$, then we'd have $$a = rs = bs \ge b = rsk = ak \ge a.$$ Hence, we have $a \ge b$ and $b \ge a$, which implies $a = b$, which would mean $r = b = a$, even though $r < a$ by assumption.