I think subqueries make sense for this query. The first subquery selects the id of the plan of your video and the second subquery selects the ids of the associated plans.
SELECT
sp.id,
sp.plan,
sp.days_limit,
sp.rate
FROM
subscription_plans sp
WHERE
id IN (SELECT DISTINCT plan_id FROM subscribed_videos sv where sv.videoid = $videoid)
OR id IN (SELECT DISTINCT assosiated_plan_id
FROM subscription_groups sg
JOIN subscribed_videos sv ON sv.plan_id = sg.plan_id
WHERE sv.videoid = $videoid)