py+7=6y+q does not involve division. What type of fraction form are you thinking of?
py+7=6y+q could be rearranged: py-6y = q - 7, or y(p-6) = q - 7
q - 7
Then y = ------------ This is y in terms of p and q. But again, I don't know
p - 6 whether this is what you were looking for.
Please be more specific.