we are taking
Avg time= read request ( read hit*cache time+ read miss*(main memory+cache time)) + write request ( main memory). As write-through works in multilevel(heirarchical) design.
why you have not taken cache time in solution.
i have taken these lines directly from hamacher,
X->YZ , Y->XZ , ...