The modified first laws of thermodynamics at the black hole horizon and the cosmological horizon of the Schwarzschild de Sitter black hole and the apparent horizon of the Friedmann-Robertson-Walker cosmology are derived by the surface tensions, respectively. The corresponding Smarr relations are obeyed. For the black hole, the cosmological constant is first treated as a fixed constant, and then as a variable associated to the pressure. The law at the apparent horizon takes the same form as that at the cosmological horizon, but is different from that at the black hole horizon. The positive temperatures guarantee the appearance of the worked terms in the modified laws at the cosmological and apparent horizons. While they can disappear at the black hole horizon.