Hypersensitivity pneumonitis is supposedly a mixed-type-III/IV reaction, but in terms of the USMLE, if it's one or the other, type-III is the better bet answer-wise.
I've seen HP show up in practice questions as an arthus reaction, so you're going to have immune complexes. In farmers, Actinomycetes is commonly found in moist hay.
The reason it's partial type-IV is because macrophages still phagocytose antigen, so an infiltrate of T-cells, plasma cells and macrophages is seen histologically.
However the type-III reaction is predominant, so I'd also expect neutrophils alongside those.
In terms of silicosis, we know it induces a restrictive lung disease, so macrophages must phagocytose the SiO2, thereby releasing TGF-beta and other growth factors. This induces collagen production by fibroblasts.
In terms of practice questions, silicosis usually always affects the upper lobes, demonstrates "egg shell" calcifications, and nodularities can be seen. FEV1/FVC should be >80% (restrictive), whereas HP should be obstructive.