Is it related to this phrase: 问个屁/問個屁
Yes, it's 问个屁. P -> 屁.
问个屁 means Don't ask!. It indicates that you are annoyed by the questioner. It's a way to block their questions to annoy you any further.
It's a ruder way to say 别问了！
Politely, roughly 'nonsense'. Various less polite Anglo-Saxon expletives may be substituted.
问个屁 Ask/Talk nonsense.
你错了 You are wrong. 错个屁! Wrong my foot!
Yes, the pronounciation of 屁 is pi(4th tone)，very close to English charater P.
what are you asking for? there is nonsense;