Ideally, the residuals of your ARMA(2,2) models are independent of each other, which means there is no pattern of autocorrelation in the residuals. The Q-test tests for an autocorrelation pattern in the residuals. The null hypothesis is (Wikipedia):
H0: The data are independently distributed (i.e. the correlations in the population from which the sample is taken are 0, so that any observed correlations in the data result from randomness of the sampling process).
Ha: The data are not independently distributed; they exhibit serial correlation.
"Data" can be read as "residuals" in your case. The lags you included tells your function to test for serial correlation in the residuals within 5, 10 and 15 time points from each other.
In general, it is correct to first select the best order for the ARMA model with the BIC (or AIC, or both) and then check whether for that model the residuals are serially independent.
The Q-test results you posted are fine, nothing to worry about.
Contribution by @RichardHardy in the comments:
There has been debate about the validity of the Ljung-Box test in these situations. The Breusch-Godfrey test is considered the most powerful test (see Testing for autocorrelation: Ljung-Box versus Breusch-Godfrey).
From the information I have been able to read through, it is my impression that serious statisticians generally agree on the superiority on the Breusch-Godfrey test. Even though it seems to be generally accepted to use both tests, that does not mean it is the right thing to do.