Both panels start from the same market. Demand D₀ slopes down (buyers want more at lower prices) and supply S₀ slopes up (sellers offer more at higher prices). They cross at E₀, the equilibrium: the one price at which the quantity buyers want equals the quantity sellers offer.
In panel (a) something raises the cost of producing the good, so sellers need a higher price for every quantity. Supply shifts up to S₁, and the market moves to E₁: a higher price and a smaller quantity. In panel (b) buyers want less of the good at every price, so demand shifts down to D₁. The new equilibrium E₁ has a lower price and a smaller quantity.
Notice that quantity falls in both panels but price moves in opposite directions. That asymmetry is how economists tell, from prices and quantities alone, whether a change came from the supply side or the demand side. Use the sliders to reverse either shift or make the curves steeper, and watch where E₁ lands.