Let's say I have a polynomial $f(x) = x^5 + 3x + 5$. You can check on Pari that the Galois Group over $\mathbb{Q}$ is $S_5$. $K$ be the intermediate field obtained by adjoining a root of $f(x)$ to $\mathbb{Q}$. $L$ be the Galois Closure of $K$ over $\mathbb{Q}$. Do there exists a Pari/Magma function to find the Galois group $H =\mathrm{ Gal}(L \mid K)$?
I especially need to find out how the right cosets of $H$ in $\mathrm{Gal}(L \mid \mathbb{Q})= S_5$ interact. I'm completely new to computer algebra systems, so if there are any packages/functions that may be useful please let me know.
Magma can compute Galois groups of polynomials defined over number fields; see for example this page. But your case is straightforward and does not require a software program. By the Galois correspondence, $H$ is isomorphic to the stabilizer of 1 in $S_5$, which is the set of all 24 permutations of $\{2,3,4,5\}$. In other words, $H$ is isomorphic to $S_4$. There are 5 cosets; call them $C_1, \ldots, C_5$ where the elements in $C_i$ are the permutations in $S_5$ that send 1 to $i$. The cosets do not form a group since $H$ is not normal in $S_5$ (i.e., $K$ is not a Galois extension).
You can even generalize this. Let $f(x)$ be an irreducible polynomial of degree $n$ with rational coefficients, $G$ its Galois group, $L$ its splitting field, $K$ the number field obtained by adjoining one root of $f(x)$ to $\mathbb{Q}$, and $H$ the Galois group of $L/K$. Then $H$ is isomorphic to the stabilizer of 1 in $G$ (which you can view as $G \cap S_{n-1}$). There will be $n$ cosets, say $C_1, \ldots, C_n$, with $C_i$ consisting of all elements in $G$ that send 1 to $i$. The cosets will not form a group unless $K = L$.