Let the number of history textbooks be h and the number of physics textbooks be p.
It was given that the bookstore sells a combined total of 347 books. Thus we have:
![h+p=347](https://img.qammunity.org/2023/formulas/mathematics/college/gdoutfpoozu5lxf9x5v0sn0e9g1e8j0bgd.png)
It is also given that the number of history textbooks sold was 79 more than the number of physics textbooks. This gives:
![h=p+79](https://img.qammunity.org/2023/formulas/mathematics/college/wd7e7x39atd6rtsk9n7awtayutut4k1pwm.png)
We can substitute for h into the first equation:
![p+79+p=347](https://img.qammunity.org/2023/formulas/mathematics/college/y6sn3hfvovwrzjkt989lyzb6h99lnofcj8.png)
Solving, we have:
![\begin{gathered} 2p+79=347 \\ 2p=347-79 \\ 2p=268 \\ p=(268)/(2) \\ p=134 \end{gathered}](https://img.qammunity.org/2023/formulas/mathematics/college/gbi4ab7dh1ou2itqhik6j54oadq2iota5k.png)
Substitute for p in the second equation, we have:
![\begin{gathered} h=p+79 \\ h=134+79 \\ h=213 \end{gathered}](https://img.qammunity.org/2023/formulas/mathematics/college/pco3oll5zo4rhhtetyh0tpfhjxh3fbq1ch.png)
Therefore, there were 134 physics textbooks and 213 history textbooks.